]> git.sesse.net Git - kdenlive/commitdiff
Fix http://www.kdenlive.org:80/mantis/view.php?id=251
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 22 Oct 2008 20:17:32 +0000 (20:17 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 22 Oct 2008 20:17:32 +0000 (20:17 +0000)
svn path=/branches/KDE4/; revision=2535

src/mainwindow.cpp
src/mainwindow.h

index 891a391602c3a3eed71ed7811fc9dcaae54cb9ce..3609f904a64c617f295482a7a5c572e5142dcf57 100644 (file)
@@ -777,7 +777,7 @@ void MainWindow::setupActions() {
     collection->addAction("paste_effects", pasteEffects);
     connect(pasteEffects , SIGNAL(triggered()), this, SLOT(slotPasteEffects()));
 
-    KStandardAction::close(this, SLOT(closeCurrentDocument()), collection);
+    m_closeAction = KStandardAction::close(this, SLOT(closeCurrentDocument()), collection);
 
     KStandardAction::quit(this, SLOT(queryQuit()), collection);
 
@@ -865,6 +865,7 @@ void MainWindow::newFile(bool showProjectSettings) {
         connectDocumentInfo(doc);
         connectDocument(trackView, doc);
     } else m_timelineArea->setTabBarHidden(false);
+    m_closeAction->setEnabled(m_timelineArea->count() > 1);
 }
 
 void MainWindow::activateDocument() {
@@ -1202,6 +1203,7 @@ void MainWindow::connectDocumentInfo(KdenliveDoc *doc) {
 
 void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //changed
     //m_projectMonitor->stop();
+    m_closeAction->setEnabled(m_timelineArea->count() > 1);
     kDebug() << "///////////////////   CONNECTING DOC TO PROJECT VIEW ////////////////";
     if (m_activeDocument) {
         if (m_activeDocument == doc) return;
index 36f4d34d2879e94053c7162cd4d13d32aa498fa7..ed672aaa13f4c51fb4f75955999a8fbeca85283f 100644 (file)
@@ -147,6 +147,7 @@ private:
     KAction *m_buttonSnap;
     QActionGroup *m_toolGroup;
     KAction *m_saveAction;
+    KAction *m_closeAction;
     QSlider *m_zoomSlider;
     StatusBarMessageLabel *m_messageLabel;