mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Minor fix with the insertion of new item in the new element panel
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4351 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -164,7 +164,7 @@ int ElementCollectionItem::rowForInsertItem(const QString &collection_name)
|
|||||||
if (eci->collectionName() > collection_name)
|
if (eci->collectionName() > collection_name)
|
||||||
return indexOfChild(eci);
|
return indexOfChild(eci);
|
||||||
|
|
||||||
return childCount();
|
return (indexOfChild(child.last())+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -167,13 +167,13 @@ bool ElementLocation::setPath(QString path)
|
|||||||
m_file_system_path = path;
|
m_file_system_path = path;
|
||||||
if (path.startsWith(QETApp::commonElementsDirN()))
|
if (path.startsWith(QETApp::commonElementsDirN()))
|
||||||
{
|
{
|
||||||
path.remove(QETApp::commonElementsDirN() + "/");
|
path.remove(QETApp::commonElementsDirN()+="/");
|
||||||
path.prepend("common://");
|
path.prepend("common://");
|
||||||
m_collection_path = path;
|
m_collection_path = path;
|
||||||
}
|
}
|
||||||
else if (path.startsWith(QETApp::customElementsDirN()))
|
else if (path.startsWith(QETApp::customElementsDirN()))
|
||||||
{
|
{
|
||||||
path.remove(QETApp::customElementsDirN() + "/");
|
path.remove(QETApp::customElementsDirN()+="/");
|
||||||
path.prepend("custom://");
|
path.prepend("custom://");
|
||||||
m_collection_path = path;
|
m_collection_path = path;
|
||||||
}
|
}
|
||||||
@@ -184,13 +184,13 @@ bool ElementLocation::setPath(QString path)
|
|||||||
m_file_system_path = path;
|
m_file_system_path = path;
|
||||||
if (path.startsWith(QETApp::commonElementsDirN()))
|
if (path.startsWith(QETApp::commonElementsDirN()))
|
||||||
{
|
{
|
||||||
path.remove(QETApp::commonElementsDirN() + "/");
|
path.remove(QETApp::commonElementsDirN()+="/");
|
||||||
path.prepend("common://");
|
path.prepend("common://");
|
||||||
m_collection_path = path;
|
m_collection_path = path;
|
||||||
}
|
}
|
||||||
else if (path.startsWith(QETApp::customElementsDirN()))
|
else if (path.startsWith(QETApp::customElementsDirN()))
|
||||||
{
|
{
|
||||||
path.remove(QETApp::customElementsDirN()) + "/";
|
path.remove(QETApp::customElementsDirN()+="/");
|
||||||
path.prepend("custom://");
|
path.prepend("custom://");
|
||||||
m_collection_path = path;
|
m_collection_path = path;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,9 +64,6 @@ class FileElementCollectionItem : public ElementCollectionItem
|
|||||||
private:
|
private:
|
||||||
void setPathName(QString path_name);
|
void setPathName(QString path_name);
|
||||||
void populate();
|
void populate();
|
||||||
// bool handleElementDrop (const QMimeData *data);
|
|
||||||
// bool handleDirectoryDrop (const QMimeData *data);
|
|
||||||
// bool createSubDir (QDir dir_to_copy, QDir destination);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_path;
|
QString m_path;
|
||||||
|
|||||||
Reference in New Issue
Block a user