show the name of the analysis loaded
authorDiane Trout <diane@caltech.edu>
Thu, 4 May 2006 00:41:52 +0000 (00:41 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 4 May 2006 00:41:52 +0000 (00:41 +0000)
ticket:84 put the filename (for gui loaded) or the analysis name
(for command line loaded) names in the mussa window.

qui/MussaWindow.cpp

index 6ecb88aa563cae84f467f6769e2a91d811deec05..0c86b7d7cbe7be2322bec17850eb2d1aea8813dc 100644 (file)
@@ -91,6 +91,7 @@ void MussaWindow::setAnalysis(Mussa *new_analysis)
     // only switch mussas if we loaded without error
     delete analysis;
     analysis = new_analysis;
+    setWindowTitle(analysis->get_name().c_str());
     updateAnalysis();
   }
 }
@@ -309,6 +310,7 @@ void MussaWindow::loadMupa()
     m->load_mupa_file(converted_path);
     m->analyze(0, 0, Mussa::TransitiveNway, 0.0);
     setAnalysis(m);
+    setWindowTitle(converted_path.native_file_string().c_str());
   } catch (mussa_load_error e) {
     QString msg("Unable to load ");
     msg += mupa_path;
@@ -335,6 +337,7 @@ void MussaWindow::loadSavedAnalysis()
     m->load(converted_path);
     // only switch mussas if we loaded without error
     setAnalysis(m);
+    setWindowTitle(converted_path.native_file_string().c_str());
   } catch (mussa_load_error e) {
     QString msg("Unable to load ");
     msg += muway_dir;