X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOperationGUI%2FOperationGUI.cxx;h=63c6de0f1e462ee9319bbd98cd03ff110cf11bad;hb=e7e908bf4c7c8bec141fe2d3b4a9924ddaea6c04;hp=e13817f643541ae78a52622add605e07c227107c;hpb=9499b99fe2dcb53e1ea364f97986f8f432b04600;p=modules%2Fgeom.git diff --git a/src/OperationGUI/OperationGUI.cxx b/src/OperationGUI/OperationGUI.cxx index e13817f64..63c6de0f1 100644 --- a/src/OperationGUI/OperationGUI.cxx +++ b/src/OperationGUI/OperationGUI.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -40,26 +40,11 @@ #include "OperationGUI_ArchimedeDlg.h" // Method ARCHIMEDE #include "OperationGUI_FilletDlg.h" // Method FILLET #include "OperationGUI_ChamferDlg.h" // Method CHAMFER - #include "OperationGUI_ClippingDlg.h" +#include "OperationGUI_GetShapesOnShapeDlg.h" using namespace std; -OperationGUI* OperationGUI::myGUIObject = 0; - -//======================================================================= -// function : GetOperationGUI() -// purpose : Get the only OperationGUI object [ static ] -//======================================================================= -OperationGUI* OperationGUI::GetOperationGUI( GeometryGUI* parent ) -{ - if ( myGUIObject == 0 ) { - // init OperationGUI only once - myGUIObject = new OperationGUI( parent ); - } - return myGUIObject; -} - //======================================================================= // function : OperationGUI() // purpose : Constructor @@ -68,7 +53,6 @@ OperationGUI::OperationGUI(GeometryGUI* parent) : GEOMGUI(parent) { } - //======================================================================= // function : ~OperationGUI() // purpose : Destructor @@ -84,6 +68,9 @@ OperationGUI::~OperationGUI() //======================================================================= bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) { + SalomeApp_Application* app = getGeometryGUI()->getApp(); + if (!app) return false; + getGeometryGUI()->EmitSignalDeactivateDialog(); switch (theCommandID) @@ -93,8 +80,9 @@ bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) case 505: (new OperationGUI_FilletDlg (getGeometryGUI(), parent))->show(); break; case 506: (new OperationGUI_ChamferDlg (getGeometryGUI(), parent))->show(); break; case 507: (new OperationGUI_ClippingDlg (getGeometryGUI(), parent))->show(); break; + case 508: (new OperationGUI_GetShapesOnShapeDlg (getGeometryGUI(), parent))->show(); break; default: - getGeometryGUI()->getApp()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); } return true; @@ -110,6 +98,6 @@ extern "C" #endif GEOMGUI* GetLibGUI(GeometryGUI* parent) { - return OperationGUI::GetOperationGUI(parent); + return new OperationGUI(parent); } }