]> git.sesse.net Git - kdenlive/commitdiff
- Set document modified when using spacer tool or moving transitions
authorTill Theato <root@ttill.de>
Thu, 22 Jul 2010 22:49:29 +0000 (22:49 +0000)
committerTill Theato <root@ttill.de>
Thu, 22 Jul 2010 22:49:29 +0000 (22:49 +0000)
- Do not create spacer command if there is no item to move

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

src/customtrackview.cpp

index 5a0af438daaf5f1af973375859979fa45244243b..b38ea7d9da6ffb5db4492fd00a3631ba045d1ba5 100644 (file)
@@ -2969,12 +2969,14 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                         trackTransitionStartList[m_document->tracksCount() - info.track] = info.startPos.frames(m_document->fps());
                 }
             }
-
-            InsertSpaceCommand *command = new InsertSpaceCommand(this, clipsToMove, transitionsToMove, track, timeOffset, false);
-            m_commandStack->push(command);
-            if (track != -1) track = m_document->tracksCount() - track;
-            kDebug() << "SPACER TRACK:" << track;
-            m_document->renderer()->mltInsertSpace(trackClipStartList, trackTransitionStartList, track, timeOffset, GenTime());
+            if (!clipsToMove.isEmpty() || !transitionsToMove.isEmpty()) {
+                InsertSpaceCommand *command = new InsertSpaceCommand(this, clipsToMove, transitionsToMove, track, timeOffset, false);
+                m_commandStack->push(command);
+                if (track != -1) track = m_document->tracksCount() - track;
+                kDebug() << "SPACER TRACK:" << track;
+                m_document->renderer()->mltInsertSpace(trackClipStartList, trackTransitionStartList, track, timeOffset, GenTime());
+                setDocumentModified();
+            }
         }
         resetSelectionGroup(false);
         m_operationMode = NONE;
@@ -3137,6 +3139,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                     adjustTimelineTransitions(m_scene->editMode(), transition, moveCommand);
                     new MoveTransitionCommand(this, m_dragItemInfo, info, false, moveCommand);
                     m_commandStack->push(moveCommand);
+                    setDocumentModified();
                 }
             }
         } else {