]> git.sesse.net Git - kdenlive/commitdiff
Fix guides updating issue:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 30 Jul 2009 21:01:46 +0000 (21:01 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 30 Jul 2009 21:01:46 +0000 (21:01 +0000)
http://kdenlive.org/mantis/view.php?id=1061

svn path=/trunk/kdenlive/; revision=3789

src/customtrackview.cpp

index d33f2d2edac8de49d84ca41bfc6431bc8ac7abf9..2c96475f54842e1aebc48699fc3dd9deb305b1de 100644 (file)
 #include <QInputDialog>
 
 
+bool sortGuidesList(const Guide *g1 , const Guide *g2)
+{
+    return (*g1).position() < (*g2).position();
+}
+
+
 //TODO:
 // disable animation if user asked it in KDE's global settings
 // http://lists.kde.org/?l=kde-commits&m=120398724717624&w=2
@@ -2348,6 +2354,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
             EditGuideCommand *command = new EditGuideCommand(this, m_dragGuide->position(), m_dragGuide->label(), newPos, m_dragGuide->label(), false);
             m_commandStack->push(command);
             m_dragGuide->updateGuide(GenTime(m_dragGuide->pos().x(), m_document->fps()));
+            qSort(m_guides.begin(), m_guides.end(), sortGuidesList);
             m_document->syncGuides(m_guides);
         }
         m_dragGuide = NULL;
@@ -3695,11 +3702,6 @@ void CustomTrackView::addMarker(const QString &id, const GenTime &pos, const QSt
     viewport()->update();
 }
 
-bool sortGuidesList(const Guide *g1 , const Guide *g2)
-{
-    return (*g1).position() < (*g2).position();
-}
-
 int CustomTrackView::hasGuide(int pos, int offset)
 {
     for (int i = 0; i < m_guides.count(); i++) {