From bbae505696ed89e4f414309f09e8fed6886f2bbe Mon Sep 17 00:00:00 2001 From: sbh Date: Tue, 16 Apr 2013 11:25:24 +0000 Subject: [PATCH] refs #2972 hide empty toolbars --- src/Qtx/QtxDockAction.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ); -- 2.39.2