From: sbh Date: Tue, 16 Apr 2013 11:25:24 +0000 (+0000) Subject: refs #2972 hide empty toolbars X-Git-Tag: V5_2_9~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bbae505696ed89e4f414309f09e8fed6886f2bbe;p=modules%2Fgui.git refs #2972 hide empty toolbars --- diff --git a/src/Qtx/QtxDockAction.cxx b/src/Qtx/QtxDockAction.cxx index 606a39587..87258ce7d 100755 --- a/src/Qtx/QtxDockAction.cxx +++ b/src/Qtx/QtxDockAction.cxx @@ -250,8 +250,12 @@ void QtxDockAction::updateMenu() { QList tbList; toolBars( tbList ); - for ( QList::iterator it = tbList.begin(); it != tbList.end(); ++it ) - pm->addAction( (*it)->toggleViewAction() ); + for ( QList::iterator it = tbList.begin(); it != tbList.end(); ++it ){ + QAction* act = (*it)->toggleViewAction(); + if( act->text().isEmpty() ) + continue; + pm->addAction( act ); + } } Qtx::simplifySeparators( pm );