]> git.sesse.net Git - kdenlive/blobdiff - src/subprojectitem.h
Make folders appear on top of the project tree:
[kdenlive] / src / subprojectitem.h
index fc8e4a4fcc5a4a9496e32e288e342c81381c2bb2..e38846f58ef02a19e0fcb1ce91cf8d46c3685729 100644 (file)
@@ -45,6 +45,14 @@ public:
     DocClipBase *referencedClip();
     QPoint zone() const;
 
+    /** Make sure folders appear on top of the tree widget */
+    virtual bool operator<(const QTreeWidgetItem &other)const {
+       int column = treeWidget()->sortColumn();
+       if (other.type() != PROJECTFOLDERTYPE)
+         return text(column).toLower() < other.text(column).toLower();
+       else return false;
+    }
+
 private:
     int m_in;
     int m_out;