From 9e499b166acd9af72aa2bbcc39a550e6e181320b Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 17 Nov 2016 14:29:07 +0300 Subject: [PATCH] DisplayAllAnnotations correction. --- src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx b/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx index b245a14f9..c7da2ae32 100755 --- a/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx +++ b/src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx @@ -525,9 +525,6 @@ void GEOMGUI_TextTreeWdg::showContextMenu( const QPoint& pos ) GeometryGUI* aModule = dynamic_cast(anApp->activeModule()); QMenu aMenu; - aMenu.addAction( aModule->action(GEOMOp::OpShowAllAnnotations) ); - aMenu.addAction( aModule->action(GEOMOp::OpHideAllAnnotations) ); - if ( !selectedItems().isEmpty() && selectedItems().count() == 1 ) { QTreeWidgetItem* anItem = selectedItems().first(); QString anEntry = entryFromItem( anItem->parent() ); @@ -538,7 +535,6 @@ void GEOMGUI_TextTreeWdg::showContextMenu( const QPoint& pos ) if ( aProp->GetNumber() == 0 ) return; - aMenu.clear(); // Edit annotation action QAction* anEditAction = aModule->action(GEOMOp::OpEditAnnotation); if ( anEditAction ) @@ -553,6 +549,8 @@ void GEOMGUI_TextTreeWdg::showContextMenu( const QPoint& pos ) aMenu.addAction( myActions[GEOMOp::OpShow] ); } } + aMenu.addAction( aModule->action(GEOMOp::OpShowAllAnnotations) ); + aMenu.addAction( aModule->action(GEOMOp::OpHideAllAnnotations) ); QAction* selPopupItem = aMenu.exec( viewport()->mapToGlobal(pos) ); if ( selPopupItem == myActions[GEOMOp::OpShow] || -- 2.39.2