diff --git a/src/DependencyTree/CMakeLists.txt b/src/DependencyTree/CMakeLists.txt index b57dce943..91580628d 100644 --- a/src/DependencyTree/CMakeLists.txt +++ b/src/DependencyTree/CMakeLists.txt @@ -31,6 +31,7 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/OBJECT ${PROJECT_SOURCE_DIR}/src/GEOMUtils ${PROJECT_SOURCE_DIR}/src/GEOMClient + ${PROJECT_SOURCE_DIR}/src/GEOMToolsGUI ${PROJECT_BINARY_DIR}/idl ) diff --git a/src/DependencyTree/DependencyTree_ViewModel.cxx b/src/DependencyTree/DependencyTree_ViewModel.cxx index 74bf9f2c4..3c03d67ac 100644 --- a/src/DependencyTree/DependencyTree_ViewModel.cxx +++ b/src/DependencyTree/DependencyTree_ViewModel.cxx @@ -31,6 +31,7 @@ // GEOM includes #include +#include // QT includes #include @@ -112,6 +113,18 @@ void DependencyTree_ViewModel::onShowOnlySelected() } } +//================================================================================= +// function : onReduceStudy() +// purpose : slot for showing dialog box "Reduce Study" +//================================================================================= +void DependencyTree_ViewModel::onReduceStudy() +{ + DependencyTree_View* viewPort = dynamic_cast( getActiveViewPort() ); + QDialog* dlg = new GEOMToolsGUI_ReduceStudyDlg( viewPort ); + if( dlg != NULL ) + dlg->show(); +} + //================================================================================= // function : contextMenuPopup() // purpose : process calling of context menu popup @@ -127,7 +140,9 @@ void DependencyTree_ViewModel::contextMenuPopup( QMenu* theMenu ) 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"), viewPort, SLOT( onRebuildModel() ) ); + theMenu->addAction( tr( "MEN_REBUILD_THE_TREE"), viewPort, SLOT( onRebuildModel() ) ); + theMenu->addSeparator(); + theMenu->addAction( tr( "MEN_REDUCE_STUDY" ), this, SLOT( onReduceStudy() ) ); } } } diff --git a/src/DependencyTree/DependencyTree_ViewModel.h b/src/DependencyTree/DependencyTree_ViewModel.h index 910afb236..afbfc0da0 100644 --- a/src/DependencyTree/DependencyTree_ViewModel.h +++ b/src/DependencyTree/DependencyTree_ViewModel.h @@ -39,6 +39,7 @@ private slots: void onShowSelected(); void onShowOnlySelected(); + void onReduceStudy(); }; diff --git a/src/DependencyTree/resources/DependencyTree_msg_en.ts b/src/DependencyTree/resources/DependencyTree_msg_en.ts index a4a763781..c1c04a16d 100644 --- a/src/DependencyTree/resources/DependencyTree_msg_en.ts +++ b/src/DependencyTree/resources/DependencyTree_msg_en.ts @@ -33,8 +33,12 @@ DependencyTree_ViewModel - REBUILD_THE_TREE + MEN_REBUILD_THE_TREE Rebuild the tree + + MEN_REDUCE_STUDY + Reduce study + diff --git a/src/DependencyTree/resources/DependencyTree_msg_fr.ts b/src/DependencyTree/resources/DependencyTree_msg_fr.ts index ab3e08246..ffeb404bc 100644 --- a/src/DependencyTree/resources/DependencyTree_msg_fr.ts +++ b/src/DependencyTree/resources/DependencyTree_msg_fr.ts @@ -33,8 +33,12 @@ DependencyTree_ViewModel - REBUILD_THE_TREE + MEN_REBUILD_THE_TREE Rebuild the tree + + MEN_REDUCE_STUDY + Reduce study + diff --git a/src/DependencyTree/resources/DependencyTree_msg_ja.ts b/src/DependencyTree/resources/DependencyTree_msg_ja.ts index 1f3400058..642f04c6a 100644 --- a/src/DependencyTree/resources/DependencyTree_msg_ja.ts +++ b/src/DependencyTree/resources/DependencyTree_msg_ja.ts @@ -33,8 +33,12 @@ DependencyTree_ViewModel - REBUILD_THE_TREE + MEN_REBUILD_THE_TREE Rebuild the tree + + MEN_REDUCE_STUDY + Reduce study + \ No newline at end of file diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index 68ed62133..2ca503aae 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -904,7 +904,6 @@ void GEOMToolsGUI::OnShowDependencyTree() void GEOMToolsGUI::OnReduceStudy() { QDialog* dlg = new GEOMToolsGUI_ReduceStudyDlg( SUIT_Session::session()->activeApplication()->desktop() ); - if ( dlg != NULL ) + if( dlg != NULL ) dlg->show(); - }