myMode(mode),
myBusy(false),
myIsShapeType(false),
- myIsHiddenMain(false)
+ myIsHiddenMain(false),
+ myWasHiddenMain(true)
{
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
GroupGUI_GroupDlg::~GroupGUI_GroupDlg()
{
GEOM_Displayer* aDisplayer = getDisplayer();
- if (myIsHiddenMain) {
+ if (myWasHiddenMain) {
+ aDisplayer->Erase(myMainObj);
+ myIsHiddenMain = true;
+ } else {
aDisplayer->Display(myMainObj);
myIsHiddenMain = false;
}
GEOM::GEOM_IGroupOperations_var anOper = GEOM::GEOM_IGroupOperations::_narrow(getOperation());
myMainObj = anOper->GetMainShape(myGroup);
- if (!CORBA::is_nil(myMainObj))
+ if (!CORBA::is_nil(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));
myIsHiddenMain = false;
}
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));
// activate sub-shapes selection by default
myEditCurrentArgument = 0;