]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
refs #2972 hide empty toolbars
authorsbh <sbh@opencascade.com>
Tue, 16 Apr 2013 11:25:24 +0000 (11:25 +0000)
committersbh <sbh@opencascade.com>
Tue, 16 Apr 2013 11:25:24 +0000 (11:25 +0000)
src/Qtx/QtxDockAction.cxx

index 606a3958739ada8a96ea9a0dad7f28d9a530103c..87258ce7d30a1df3f46559e7f5b743d0d67ede27 100755 (executable)
@@ -250,8 +250,12 @@ void QtxDockAction::updateMenu()
   {
     QList<QToolBar*> tbList;
     toolBars( tbList );
-    for ( QList<QToolBar*>::iterator it = tbList.begin(); it != tbList.end(); ++it )
-      pm->addAction( (*it)->toggleViewAction() );
+    for ( QList<QToolBar*>::iterator it = tbList.begin(); it != tbList.end(); ++it ){
+      QAction* act = (*it)->toggleViewAction();
+      if( act->text().isEmpty() )
+        continue;
+      pm->addAction( act );
+    }
   }
 
   Qtx::simplifySeparators( pm );