]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0052938: Visibility of object is wrong when closing "Create group" dilaog
authormpa <mpa@opencascade.com>
Fri, 6 Nov 2015 10:15:49 +0000 (13:15 +0300)
committermpa <mpa@opencascade.com>
Fri, 6 Nov 2015 10:16:08 +0000 (13:16 +0300)
src/GroupGUI/GroupGUI_GroupDlg.cxx
src/GroupGUI/GroupGUI_GroupDlg.h

index 40463f32a2bb9de1ee547eeffc5b3c423d8ed52a..5bf351f85bc6bf1973d838a0f251e7059b3687c2 100644 (file)
@@ -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()) {
index 06ecae4cf2d76592fcdd45cfea8dddd764db6efe..4a2385b042dfdd11053bd9ddd2a1b9398e7a8c14 100644 (file)
@@ -115,6 +115,7 @@ private:
   TColStd_DataMapOfIntegerInteger     myMain2InPlaceIndices;
   QList<int>                          myGroupIdList;
   int                                 myDmMode;
+  bool                                myIsAccept;
 
   QPushButton*                        mySelBtn;
   QLineEdit*                          myMainName;