]> git.sesse.net Git - kdenlive/commitdiff
Keep selected items selected after finishing a move involving multiple groups
authorTill Theato <root@ttill.de>
Sat, 28 Aug 2010 18:47:34 +0000 (18:47 +0000)
committerTill Theato <root@ttill.de>
Sat, 28 Aug 2010 18:47:34 +0000 (18:47 +0000)
svn path=/trunk/kdenlive/; revision=4773

src/customtrackview.cpp

index ccb5d37b43ab465ef9c1289e3b460e9804415f5a..b74b749741d0b45c8565a9c3eef985e341ff9997 100644 (file)
@@ -3308,9 +3308,20 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                     m_selectionGroupInfo.track = m_selectionGroup->track();
 
                     for (int i = 0; i < items.count(); ++i) {
-                        if (items.at(i)->type() == GROUPWIDGET)
+                        if (items.at(i)->type() == GROUPWIDGET) {
                             rebuildGroup((AbstractGroupItem*)items.at(i));
+                            items.removeAt(i);
+                            --i;
+                        }
+                    }
+                    for (int i = 0; i < items.count(); ++i) {
+                        if (items.at(i)) {
+                            items.at(i)->setSelected(true);
+                            if (items.at(i)->parentItem())
+                                items.at(i)->parentItem()->setSelected(true);
+                        }
                     }
+                    groupSelectedItems();
                 } else {
                     rebuildGroup((AbstractGroupItem *)group);
                 }
@@ -4198,6 +4209,7 @@ void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> sta
             if (children.at(i)->parentItem())
                 rebuildGroup((AbstractGroupItem*)children.at(i)->parentItem());
         }
+        clearSelection();
 
         KdenliveSettings::setSnaptopoints(snap);
         m_document->renderer()->doRefresh();