changeset 145:dfaf4f9330b5

* minor usability fixes
author Chris Cannam
date Fri, 18 May 2007 16:47:38 +0000
parents 56c00f977cac
children d27f13651e67
files main/main.cpp sv.pro transform/FeatureExtractionPluginTransform.cpp
diffstat 3 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/main.cpp	Fri May 11 11:22:06 2007 +0000
+++ b/main/main.cpp	Fri May 18 16:47:38 2007 +0000
@@ -278,6 +278,7 @@
 
     bool haveSession = false;
     bool haveMainModel = false;
+    bool havePriorCommandLineModel = false;
 
     for (QStringList::iterator i = args.begin(); i != args.end(); ++i) {
 
@@ -308,9 +309,18 @@
         if (status != MainWindow::FileOpenSucceeded) {
             if (!haveMainModel) {
                 status = gui.openSomeFile(path, MainWindow::ReplaceMainModel);
-                if (status == MainWindow::FileOpenSucceeded) haveMainModel = true;
+                if (status == MainWindow::FileOpenSucceeded) {
+                    haveMainModel = true;
+                }
             } else {
-                status = gui.openSomeFile(path, MainWindow::CreateAdditionalModel);
+                if (haveSession && !havePriorCommandLineModel) {
+                    status = gui.openSomeFile(path, MainWindow::AskUser);
+                    if (status == MainWindow::FileOpenSucceeded) {
+                        havePriorCommandLineModel = true;
+                    }
+                } else {
+                    status = gui.openSomeFile(path, MainWindow::CreateAdditionalModel);
+                }
             }
         }
         if (status == MainWindow::FileOpenFailed) {
--- a/sv.pro	Fri May 11 11:22:06 2007 +0000
+++ b/sv.pro	Fri May 18 16:47:38 2007 +0000
@@ -9,6 +9,8 @@
 
 TARGET = sonic-visualiser
 
+ICON = icons/sv-macicon.icns
+
 DEPENDPATH += . .. audioio document i18n main osc transform
 INCLUDEPATH += . .. audioio document transform osc main
 LIBPATH = ../view ../layer ../data ../widgets ../plugin ../base ../system $$LIBPATH
--- a/transform/FeatureExtractionPluginTransform.cpp	Fri May 11 11:22:06 2007 +0000
+++ b/transform/FeatureExtractionPluginTransform.cpp	Fri May 18 16:47:38 2007 +0000
@@ -492,8 +492,8 @@
 	binCount = m_descriptor->binCount;
     }
 
-    std::cerr << "FeatureExtractionPluginTransform::setCompletion("
-              << completion << ")" << std::endl;
+//    std::cerr << "FeatureExtractionPluginTransform::setCompletion("
+//              << completion << ")" << std::endl;
 
     if (binCount == 0) {