Add window titles
[mussa.git] / qui / MussaWindow.cpp
index 01702309e1938aaa0bedd697ab6ecf55c33640b0..09d6ee9ba891b19fe06e6d1b76fc5647817acfb7 100644 (file)
@@ -35,7 +35,7 @@ MussaWindow::MussaWindow(MussaRef analysis_, QWidget *parent) :
   default_dir(QDir::home().absolutePath().toStdString(), fs::native),
   motif_editor(0),
   setup_analysis_dialog(new MussaSetupDialog(this)),
-  subanalysis_window(new SubanalysisWindow),
+  subanalysis_window(new SubanalysisWindow(analysis)),
   browser(new SequenceBrowserWidget(this)),  
   mussaViewTB(new QToolBar("Path Views")),
   zoom(new ZoomWidget),
@@ -720,11 +720,6 @@ MussaWindow::updateProgress(const string& description, int current, int max)
 void MussaWindow::updateTitle()
 {
   if (analysis) {
-    fs::path analysis_path = analysis->get_analysis_path();
-    if (not analysis_path.empty()) {
-      setWindowTitle(analysis_path.native_file_string().c_str());
-    } else if (analysis->get_name().size() > 0) {
-      setWindowTitle(analysis->get_name().c_str());
-    } 
+    setWindowTitle(analysis->get_title().c_str());
   }
 }