[qet] [4351] Minor fix with the insertion of new item in the new element panel |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4351
Author: blacksun
Date: 2016-02-18 17:56:08 +0100 (Thu, 18 Feb 2016)
Log Message:
-----------
Minor fix with the insertion of new item in the new element panel
Modified Paths:
--------------
trunk/sources/ElementsCollection/elementcollectionitem.cpp
trunk/sources/ElementsCollection/elementlocation.cpp
trunk/sources/ElementsCollection/fileelementcollectionitem.h
Modified: trunk/sources/ElementsCollection/elementcollectionitem.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementcollectionitem.cpp 2016-02-17 19:23:00 UTC (rev 4350)
+++ trunk/sources/ElementsCollection/elementcollectionitem.cpp 2016-02-18 16:56:08 UTC (rev 4351)
@@ -164,7 +164,7 @@
if (eci->collectionName() > collection_name)
return indexOfChild(eci);
- return childCount();
+ return (indexOfChild(child.last())+1);
}
/**
Modified: trunk/sources/ElementsCollection/elementlocation.cpp
===================================================================
--- trunk/sources/ElementsCollection/elementlocation.cpp 2016-02-17 19:23:00 UTC (rev 4350)
+++ trunk/sources/ElementsCollection/elementlocation.cpp 2016-02-18 16:56:08 UTC (rev 4351)
@@ -167,13 +167,13 @@
m_file_system_path = path;
if (path.startsWith(QETApp::commonElementsDirN()))
{
- path.remove(QETApp::commonElementsDirN() + "/");
+ path.remove(QETApp::commonElementsDirN()+="/");
path.prepend("common://");
m_collection_path = path;
}
else if (path.startsWith(QETApp::customElementsDirN()))
{
- path.remove(QETApp::customElementsDirN() + "/");
+ path.remove(QETApp::customElementsDirN()+="/");
path.prepend("custom://");
m_collection_path = path;
}
@@ -184,13 +184,13 @@
m_file_system_path = path;
if (path.startsWith(QETApp::commonElementsDirN()))
{
- path.remove(QETApp::commonElementsDirN() + "/");
+ path.remove(QETApp::commonElementsDirN()+="/");
path.prepend("common://");
m_collection_path = path;
}
else if (path.startsWith(QETApp::customElementsDirN()))
{
- path.remove(QETApp::customElementsDirN()) + "/";
+ path.remove(QETApp::customElementsDirN()+="/");
path.prepend("custom://");
m_collection_path = path;
}
Modified: trunk/sources/ElementsCollection/fileelementcollectionitem.h
===================================================================
--- trunk/sources/ElementsCollection/fileelementcollectionitem.h 2016-02-17 19:23:00 UTC (rev 4350)
+++ trunk/sources/ElementsCollection/fileelementcollectionitem.h 2016-02-18 16:56:08 UTC (rev 4351)
@@ -64,9 +64,6 @@
private:
void setPathName(QString path_name);
void populate();
-// bool handleElementDrop (const QMimeData *data);
-// bool handleDirectoryDrop (const QMimeData *data);
-// bool createSubDir (QDir dir_to_copy, QDir destination);
private:
QString m_path;