Salome HOME
- add possibility to rebuild dependency tree by selecting objects
[modules/geom.git] / src / DependencyTree / DependencyTree_ViewModel.cxx
index b3301b981fdf6f7cd1961f96b76d540c3bb0c710..813e94c728200cfb5f83604bb30c9a904f3a592b 100644 (file)
@@ -119,13 +119,16 @@ void DependencyTree_ViewModel::contextMenuPopup( QMenu* theMenu )
   GraphicsView_Viewer::contextMenuPopup( theMenu );
   std::cout<<"\n\n\n\n *****contextMenuPopup " << std::endl;
 
+
   if( DependencyTree_View* aViewPort = dynamic_cast<DependencyTree_View*>(getActiveViewPort()) )
   {
     int aNbSelected = aViewPort->nbSelected();
     std::cout<<"\n  aNbSelected " << aNbSelected << std::endl;
     if( aNbSelected > 0 ) {
+      theMenu->clear();
       theMenu->addAction( tr( "MEN_DISPLAY" ), this, SLOT( onShowSelected() ) );
       theMenu->addAction( tr( "MEN_DISPLAY_ONLY" ), this, SLOT( onShowOnlySelected() ) );
+      theMenu->addAction( tr( "REBUILD_THE_TREE"), aViewPort, SLOT( onUpdateModel() ) );
     }
   }