]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Ensure clip in project tree is visible after a rename:
[kdenlive] / src / projectlist.cpp
index 276a39adfb9f95bc75820147bd9847046d26e19a..b3d5f517897abde934c4e378146ca1f4ff5b005e 100644 (file)
@@ -1038,11 +1038,17 @@ void ProjectList::slotItemEdited(QTreeWidgetItem *item, int column)
                 emit projectModified();
                 EditClipCommand *command = new EditClipCommand(this, clip->clipId(), oldprops, newprops, false);
                 m_commandStack->push(command);
+               QTimer::singleShot(100, this, SLOT(slotCheckScrolling()));
             }
         }
     }
 }
 
+void ProjectList::slotCheckScrolling()
+{
+    m_listView->scrollToItem(m_listView->currentItem());
+}
+
 void ProjectList::slotContextMenu(const QPoint &pos, QTreeWidgetItem *item)
 {
     bool enable = item ? true : false;