mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-29 00:37:50 +05:00
fix SWP12975
Merging with current version
This commit is contained in:
parent
4e85b01e33
commit
e43daf7b19
@ -45,21 +45,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
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()
|
// function : OperationGUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
@ -68,7 +53,6 @@ OperationGUI::OperationGUI(GeometryGUI* parent) : GEOMGUI(parent)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : ~OperationGUI()
|
// function : ~OperationGUI()
|
||||||
// purpose : Destructor
|
// purpose : Destructor
|
||||||
@ -84,6 +68,9 @@ OperationGUI::~OperationGUI()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
||||||
{
|
{
|
||||||
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
|
if (!app) return false;
|
||||||
|
|
||||||
getGeometryGUI()->EmitSignalDeactivateDialog();
|
getGeometryGUI()->EmitSignalDeactivateDialog();
|
||||||
|
|
||||||
switch (theCommandID)
|
switch (theCommandID)
|
||||||
@ -94,7 +81,7 @@ bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
|||||||
case 506: (new OperationGUI_ChamferDlg (getGeometryGUI(), parent))->show(); break;
|
case 506: (new OperationGUI_ChamferDlg (getGeometryGUI(), parent))->show(); break;
|
||||||
case 507: (new OperationGUI_ClippingDlg (getGeometryGUI(), parent))->show(); break;
|
case 507: (new OperationGUI_ClippingDlg (getGeometryGUI(), parent))->show(); break;
|
||||||
default:
|
default:
|
||||||
getGeometryGUI()->getApp()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
|
app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -110,6 +97,6 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
GEOMGUI* GetLibGUI(GeometryGUI* parent)
|
GEOMGUI* GetLibGUI(GeometryGUI* parent)
|
||||||
{
|
{
|
||||||
return OperationGUI::GetOperationGUI(parent);
|
return new OperationGUI(parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
// File : OperationGUI.h
|
// File : OperationGUI.h
|
||||||
// Author : Damien COQUERET
|
// Author : Damien COQUERET
|
||||||
// Module : GEOM
|
// Module : GEOM
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#ifndef OPERATIONGUI_H
|
#ifndef OPERATIONGUI_H
|
||||||
#define OPERATIONGUI_H
|
#define OPERATIONGUI_H
|
||||||
@ -38,19 +37,11 @@
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI : public GEOMGUI
|
class OperationGUI : public GEOMGUI
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
OperationGUI( GeometryGUI* parent ); // hide constructor to avoid direct creation
|
|
||||||
|
|
||||||
public :
|
public :
|
||||||
|
OperationGUI( GeometryGUI* parent );
|
||||||
~OperationGUI();
|
~OperationGUI();
|
||||||
|
|
||||||
// Get the only OperationGUI object
|
|
||||||
static OperationGUI* GetOperationGUI( GeometryGUI* parent );
|
|
||||||
|
|
||||||
bool OnGUIEvent(int theCommandID, SUIT_Desktop* parent);
|
bool OnGUIEvent(int theCommandID, SUIT_Desktop* parent);
|
||||||
|
|
||||||
private:
|
|
||||||
static OperationGUI* myGUIObject; // the only OperationGUI object
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user