Salome HOME
Issue #18096(Tuleap): Make property panel controls on a scroll panel based
[modules/shaper.git] / src / XGUI / XGUI_WorkshopListener.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 7701c22..e420a5a
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "XGUI_WorkshopListener.h"
@@ -39,6 +38,7 @@
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Data.h>
 #include <ModelAPI_Tools.h>
+#include <ModelAPI_ResultField.h>
 
 #include <ModuleBase_Events.h>
 #include <ModuleBase_IModule.h>
@@ -273,6 +273,7 @@ void XGUI_WorkshopListener::
     // Hide the object if it is invalid or concealed one
     bool aHide = !aObj->data() || !aObj->data()->isValid() ||
       aObj->isDisabled() || (!aObj->isDisplayed());
+
     if (!aHide) { // check that this is not hidden result
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
       aHide = aRes && aRes->isConcealed();
@@ -357,7 +358,9 @@ void XGUI_WorkshopListener::
   if (aRedisplayed || isCustomized) {
     Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
 
-    aDisplayer->updateViewer();
+    // Do not update viewer here because it can be called in a loop
+    // In this case Update has to be called after redisplay event
+    //aDisplayer->updateViewer();
   }
 }