Toolbar is now toggleable from menu.
authorBrandon King <kingb@caltech.edu>
Mon, 27 Feb 2006 22:28:13 +0000 (22:28 +0000)
committerBrandon King <kingb@caltech.edu>
Mon, 27 Feb 2006 22:28:13 +0000 (22:28 +0000)
qui/PathWindow.cxx

index fb2f9e2326cde8a064ddee71f9d5db61f9d5b426..935591ea64e69cd55d54214fa1a1e5f63044b95b 100644 (file)
@@ -79,6 +79,8 @@ void PathWindow::setupActions()
   showMussaViewToolbarAction = new QAction(tr("Show Toolbar"), this);
   connect(showMussaViewToolbarAction, SIGNAL(triggered()), 
           this, SLOT(showMussaToolbar()));
+  showMussaViewToolbarAction->setCheckable(true);
+  showMussaViewToolbarAction->setChecked(true);
 
   toggleMotifsAction = new QAction(tr("Toggle Motifs"), this);
   connect(toggleMotifsAction, SIGNAL(triggered()), 
@@ -159,7 +161,10 @@ void PathWindow::saveMotifList()
 void PathWindow::showMussaToolbar()
 {
   std::clog << "isVis?" << mussaViewTB->isVisible() <<std::endl;
-  mussaViewTB->show();
+  if (mussaViewTB->isVisible())
+    mussaViewTB->hide();
+  else
+    mussaViewTB->show();
   std::clog << "isVis?" << mussaViewTB->isVisible() <<std::endl;
 }