]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Fix timeline handling of objects (move them instead of changing their bounding rect
[kdenlive] / src / mainwindow.cpp
index caa7273723ee1cae6c4cc4b57cda255b1ce0f325..106fb0e092e7e688e33e8c9ff7d494a9361aaaf4 100644 (file)
@@ -700,11 +700,15 @@ void MainWindow::setupActions() {
     KStandardAction::paste(this, SLOT(slotPaste()),
                            actionCollection());
 
-    KStandardAction::undo(this, SLOT(undo()),
-                          actionCollection());
+    KAction *undo = KStandardAction::undo(m_commandStack, SLOT(undo()),
+                                          actionCollection());
+    undo->setEnabled(false);
+    connect(m_commandStack, SIGNAL(canUndoChanged(bool)), undo, SLOT(setEnabled(bool)));
 
-    KStandardAction::redo(this, SLOT(redo()),
-                          actionCollection());
+    KAction *redo = KStandardAction::redo(m_commandStack, SLOT(redo()),
+                                          actionCollection());
+    redo->setEnabled(false);
+    connect(m_commandStack, SIGNAL(canRedoChanged(bool)), redo, SLOT(setEnabled(bool)));
 
     KStandardAction::fullScreen(this, SLOT(slotFullScreen()), this, actionCollection());
 
@@ -716,14 +720,6 @@ void MainWindow::setupActions() {
     readOptions();
 }
 
-void MainWindow::undo() {
-    m_commandStack->undo();
-}
-
-void MainWindow::redo() {
-    m_commandStack->redo();
-}
-
 void MainWindow::slotDisplayActionMessage(QAction *a) {
     statusBar()->showMessage(a->data().toString(), 3000);
 }