]> git.sesse.net Git - kdenlive/commitdiff
Mark document modified when deleting a clip:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 12 Apr 2009 09:09:50 +0000 (09:09 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 12 Apr 2009 09:09:50 +0000 (09:09 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=762

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

src/clipmanager.cpp
src/customtrackview.cpp

index 4dee93795d848033d5492952d69a1df98275e0e8..afac6ef5c1d57000e0e1d78c2078bbc3ed5758d5 100644 (file)
@@ -144,12 +144,10 @@ void ClipManager::addClip(DocClipBase *clip)
 
 void ClipManager::slotDeleteClip(const QString &clipId)
 {
-    for (int i = 0; i < m_clipList.count(); i++) {
-        if (m_clipList.at(i)->getId() == clipId) {
-            AddClipCommand *command = new AddClipCommand(m_doc, m_clipList.at(i)->toXML(), clipId, false);
-            m_doc->commandStack()->push(command);
-            break;
-        }
+    DocClipBase *clip = getClipById(clipId);
+    if (clip) {
+        AddClipCommand *command = new AddClipCommand(m_doc, clip->toXML(), clipId, false);
+        m_doc->commandStack()->push(command);
     }
 }
 
index 69a0a9a176212f02c63d1769d5f527eba9c986ff..2a376370d0e7f2e40357b05de1661fce1df08c72 100644 (file)
@@ -2637,6 +2637,7 @@ void CustomTrackView::deleteClip(ItemInfo info)
     scene()->removeItem(item);
     if (m_dragItem == item) m_dragItem = NULL;
     delete item;
+    m_document->setModified(true);
     m_document->renderer()->doRefresh();
 }