]> git.sesse.net Git - kdenlive/commitdiff
Do not open new project in tab if user did not activate tabs, should fix:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 20 Oct 2008 19:14:30 +0000 (19:14 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 20 Oct 2008 19:14:30 +0000 (19:14 +0000)
http://www.kdenlive.org:80/mantis/view.php?id=226

svn path=/branches/KDE4/; revision=2519

src/mainwindow.cpp

index 02ee44abd154d95579bec2aa1b601e85a5d43fac..c931c4f1ec5f64f02372a0dd058fc8d84caea290 100644 (file)
@@ -844,6 +844,7 @@ void MainWindow::readOptions() {
 }
 
 void MainWindow::newFile() {
+    if (!KdenliveSettings::activatetabs()) closeCurrentDocument();
     QString profileName;
     KUrl projectFolder;
     QPoint projectTracks(3, 2);
@@ -876,6 +877,7 @@ void MainWindow::activateDocument() {
 
 void MainWindow::closeCurrentDocument() {
     QWidget *w = m_timelineArea->currentWidget();
+    if (!w) return;
     // closing current document
     int ix = m_timelineArea->currentIndex() + 1;
     if (ix == m_timelineArea->count()) ix = 0;