From 449aed5c8e6cb17a3099613621906e3b838bffab Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 6 Nov 2015 13:15:49 +0300 Subject: [PATCH] 0052938: Visibility of object is wrong when closing "Create group" dilaog --- src/GroupGUI/GroupGUI_GroupDlg.cxx | 10 ++++++---- src/GroupGUI/GroupGUI_GroupDlg.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 40463f32a..5bf351f85 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -88,7 +88,8 @@ GroupGUI_GroupDlg::GroupGUI_GroupDlg (Mode mode, GeometryGUI* theGeometryGUI, QW myBusy(false), myIsShapeType(false), myIsHiddenMain(false), - myWasHiddenMain(true) + myWasHiddenMain(true), + myIsAccept(false) { SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); @@ -235,10 +236,10 @@ GroupGUI_GroupDlg::~GroupGUI_GroupDlg() GEOM_Displayer* aDisplayer = getDisplayer(); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); bool isHideObjects = resMgr->booleanValue( "Geometry", "hide_input_object", true); - if (myWasHiddenMain) { + if (myWasHiddenMain || ( isHideObjects && myIsAccept ) ) { myIsHiddenMain = true; } - else if (!isHideObjects) { + else { aDisplayer->Display(myMainObj); myIsHiddenMain = false; } @@ -395,7 +396,8 @@ bool GroupGUI_GroupDlg::ClickOnApply() setIsDisplayResult( false ); } - if (!onAccept(myMode == CreateGroup, true, isApplyAndClose())) + myIsAccept = onAccept(myMode == CreateGroup, true, isApplyAndClose()); + if (!myIsAccept) return false; if(!isApplyAndClose()) { diff --git a/src/GroupGUI/GroupGUI_GroupDlg.h b/src/GroupGUI/GroupGUI_GroupDlg.h index 06ecae4cf..4a2385b04 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.h +++ b/src/GroupGUI/GroupGUI_GroupDlg.h @@ -115,6 +115,7 @@ private: TColStd_DataMapOfIntegerInteger myMain2InPlaceIndices; QList myGroupIdList; int myDmMode; + bool myIsAccept; QPushButton* mySelBtn; QLineEdit* myMainName; -- 2.39.2