[vlmc-devel] commit: TracksView: Fixing undo stack text ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Wed Sep 15 23:26:27 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Sep 15 21:14:42 2010 +0200| [6aaebe24eb279a55c63c0d1a813bd3d03ddb59d9] | committer: Hugo Beauzée-Luyssen 

TracksView: Fixing undo stack text

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=6aaebe24eb279a55c63c0d1a813bd3d03ddb59d9
---

 src/Gui/timeline/TracksView.cpp |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 684db90..493c770 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -1084,16 +1084,20 @@ TracksView::mouseReleaseEvent( QMouseEvent *event )
         if ( getTrack( Workflow::AudioTrack, m_numAudioTrack - 1 )->childItems().count() > 0 )
             addTrack( Workflow::AudioTrack );
 
-        UndoStack::getInstance()->beginMacro( "Move clip" );
-
         EffectUser  *target = m_actionItem->track()->trackWorkflow();
         GraphicsEffectItem  *effectItem = qgraphicsitem_cast<GraphicsEffectItem*>( m_actionItem );
         qint64      targetPos = m_actionItem->startPos();
-        if ( effectItem != NULL && m_effectTarget != NULL )
+        if ( effectItem != NULL )
         {
-            target = m_effectTarget->clipHelper()->clipWorkflow();
-            targetPos = m_actionItem->startPos() - m_effectTarget->startPos();
+            if ( m_effectTarget != NULL )
+            {
+                target = m_effectTarget->clipHelper()->clipWorkflow();
+                targetPos = m_actionItem->startPos() - m_effectTarget->startPos();
+            }
+            UndoStack::getInstance()->beginMacro( "Move effect" );
         }
+        else
+            UndoStack::getInstance()->beginMacro( "Move clip" );
         m_actionItem->triggerMove( target, targetPos );
         // Update the linked item too
         if ( m_actionItem->groupItem() )



More information about the Vlmc-devel mailing list