${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/GEOMUtils
${PROJECT_SOURCE_DIR}/src/GEOMClient
- ${PROJECT_SOURCE_DIR}/src/GEOMToolsGUI
${PROJECT_BINARY_DIR}/idl
)
${GUI_GraphicsView}
GEOM
GEOMBase
- GEOMToolsGUI
)
# --- headers ---
// GEOM includes
#include <GEOM_Displayer.h>
-#include <GEOMToolsGUI_ReduceStudyDlg.h>
+#include <GeometryGUI_Operations.h>
// QT includes
#include <QMenu>
}
}
-//=================================================================================
-// function : onReduceStudy()
-// purpose : slot for showing dialog box "Reduce Study"
-//=================================================================================
-void DependencyTree_ViewModel::onReduceStudy()
-{
- DependencyTree_View* viewPort = dynamic_cast<DependencyTree_View*>( getActiveViewPort() );
- QDialog* dlg = new GEOMToolsGUI_ReduceStudyDlg( viewPort );
- if( dlg != NULL )
- dlg->show();
-}
-
//=================================================================================
// function : contextMenuPopup()
// purpose : process calling of context menu popup
{
int aNbSelected = viewPort->nbSelected();
if( aNbSelected > 0 ) {
+ SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ GeometryGUI* aGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
theMenu->clear();
theMenu->addAction( tr( "MEN_DISPLAY" ), this, SLOT( onShowSelected() ) );
theMenu->addAction( tr( "MEN_DISPLAY_ONLY" ), this, SLOT( onShowOnlySelected() ) );
theMenu->addAction( tr( "MEN_REBUILD_THE_TREE"), viewPort, SLOT( onRebuildModel() ) );
theMenu->addSeparator();
- theMenu->addAction( tr( "MEN_REDUCE_STUDY" ), this, SLOT( onReduceStudy() ) );
+ theMenu->addAction( aGeomGUI->action( GEOMOp::OpReduceStudy ) );
}
}
}
#include <SVTK_InteractorStyle.h>
#include <SVTK_ViewModel.h>
+#include <GraphicsView_Viewer.h>
+
#include <SalomeApp_Application.h>
#include <SalomeApp_DataObject.h>
#include <SalomeApp_Study.h>
SUIT_ViewWindow* window = desk->activeWindow();
bool ViewOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
+ bool ViewDep = ( window && window->getViewManager()->getType() == GraphicsView_Viewer::Type() );
// if current viewframe is not of OCC and not of VTK type - return immediately
// fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
QList<int> NotViewerDependentCommands;
<< GEOMOp::OpPointMarker
<< GEOMOp::OpCreateFolder
<< GEOMOp::OpSortChildren;
- if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommands.contains( id ) ) {
+ if ( !ViewOCC && !ViewVTK && !ViewDep && !NotViewerDependentCommands.contains( id ) ) {
// activate OCC viewer
getApp()->getViewManager(OCCViewer_Viewer::Type(), /*create=*/true);
}