mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
Additional variable with visibility state of main shape at opening 'Create/Edit group' dialog was added in order to restore it after closing dialog.
This commit is contained in:
parent
9b4b90c373
commit
15ea376466
@ -78,7 +78,8 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
|||||||
myMode(mode),
|
myMode(mode),
|
||||||
myBusy(false),
|
myBusy(false),
|
||||||
myIsShapeType(false),
|
myIsShapeType(false),
|
||||||
myIsHiddenMain(false)
|
myIsHiddenMain(false),
|
||||||
|
myWasHiddenMain(true)
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
|
||||||
@ -192,7 +193,10 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW
|
|||||||
GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
|
GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
|
||||||
{
|
{
|
||||||
GEOM_Displayer* aDisplayer = getDisplayer();
|
GEOM_Displayer* aDisplayer = getDisplayer();
|
||||||
if (myIsHiddenMain) {
|
if (myWasHiddenMain) {
|
||||||
|
aDisplayer->Erase(myMainObj);
|
||||||
|
myIsHiddenMain = true;
|
||||||
|
} else {
|
||||||
aDisplayer->Display(myMainObj);
|
aDisplayer->Display(myMainObj);
|
||||||
myIsHiddenMain = false;
|
myIsHiddenMain = false;
|
||||||
}
|
}
|
||||||
@ -238,8 +242,16 @@ void GroupGUI_GroupDlg::Init()
|
|||||||
|
|
||||||
GEOM::GEOM_IGroupOperations_var anOper = GEOM::GEOM_IGroupOperations::_narrow(getOperation());
|
GEOM::GEOM_IGroupOperations_var anOper = GEOM::GEOM_IGroupOperations::_narrow(getOperation());
|
||||||
myMainObj = anOper->GetMainShape(myGroup);
|
myMainObj = anOper->GetMainShape(myGroup);
|
||||||
if (!CORBA::is_nil(myMainObj))
|
if (!CORBA::is_nil(myMainObj)) {
|
||||||
myMainName->setText(GEOMBase::GetName(myMainObj));
|
myMainName->setText(GEOMBase::GetName(myMainObj));
|
||||||
|
SALOME_View* view = GEOM_Displayer::GetActiveView();
|
||||||
|
if (view) {
|
||||||
|
CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
|
||||||
|
Handle(SALOME_InteractiveObject) io =
|
||||||
|
new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
|
||||||
|
if (view->isVisible(io)) myWasHiddenMain = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setShapeType((TopAbs_ShapeEnum)anOper->GetType(myGroup));
|
setShapeType((TopAbs_ShapeEnum)anOper->GetType(myGroup));
|
||||||
|
|
||||||
@ -521,6 +533,15 @@ void GroupGUI_GroupDlg::SelectionIntoArgument()
|
|||||||
myIsHiddenMain = false;
|
myIsHiddenMain = false;
|
||||||
}
|
}
|
||||||
myMainObj = anObj;
|
myMainObj = anObj;
|
||||||
|
if (!CORBA::is_nil(myMainObj)) {
|
||||||
|
SALOME_View* view = GEOM_Displayer::GetActiveView();
|
||||||
|
if (view) {
|
||||||
|
CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
|
||||||
|
Handle(SALOME_InteractiveObject) io =
|
||||||
|
new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO");
|
||||||
|
if (view->isVisible(io)) myWasHiddenMain = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
|
myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
|
||||||
// activate sub-shapes selection by default
|
// activate sub-shapes selection by default
|
||||||
myEditCurrentArgument = 0;
|
myEditCurrentArgument = 0;
|
||||||
|
@ -97,6 +97,7 @@ private:
|
|||||||
bool myBusy;
|
bool myBusy;
|
||||||
bool myIsShapeType;
|
bool myIsShapeType;
|
||||||
bool myIsHiddenMain;
|
bool myIsHiddenMain;
|
||||||
|
bool myWasHiddenMain;
|
||||||
GEOM::GEOM_Object_var myMainObj;
|
GEOM::GEOM_Object_var myMainObj;
|
||||||
GEOM::GEOM_Object_var myGroup;
|
GEOM::GEOM_Object_var myGroup;
|
||||||
GEOM::GEOM_Object_var myInPlaceObj;
|
GEOM::GEOM_Object_var myInPlaceObj;
|
||||||
|
Loading…
Reference in New Issue
Block a user