Salome HOME
SketchPoint feature appeared in origin by restart. Correction: the viewer update...
[modules/shaper.git] / src / XGUI / XGUI_WorkshopListener.cpp
index d8934f2da7c14d455a1122de8a410ca25d40b953..c79678fb22848785efdf11a3eab448def809f050 100755 (executable)
@@ -283,6 +283,7 @@ void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI
   bool aFirstVisualizedBody = false;
 
   bool aRedisplayed = false;
+  //std::list<ObjectPtr> aHiddenObjects;
   for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) {
     ObjectPtr aObj = (*aIt);
 
@@ -293,6 +294,7 @@ void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI
       ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
       aHide = aRes && aRes->isConcealed();
     }
+
 #ifdef DEBUG_RESULT_COMPSOLID
     ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
     if (aRes.get()) {
@@ -316,6 +318,9 @@ void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI
       }
     #endif
     if (aHide) {
+      //we should provide objects which are hidden in the viewer, e.g. sketch always should visualizes
+      // all sub-features, if some features are to be hidden, sould be proposed may be to removed #1223
+      //aHiddenObjects.push_back(aObj);
       aRedisplayed = aDisplayer->erase(aObj, false) || aRedisplayed;
       #ifdef DEBUG_FEATURE_REDISPLAY
         // Redisplay the visible object or the object of the current operation
@@ -355,6 +360,11 @@ void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr<ModelAPI
       }
     }
   }
+  // this processing should be moved in another place in order to do not cause problems in
+  // flush messages chain
+  //if (aHiddenObjects.size() > 0)
+  //  myWorkshop->module()->processHiddenObject(aHiddenObjects);
+
   bool isCustomized = customizeCurrentObject(anObjects, aRedisplayed);
   if (aRedisplayed || isCustomized) {
     //VSV FitAll updated viewer by it self
@@ -583,7 +593,9 @@ bool XGUI_WorkshopListener::customizeCurrentObject(const std::set<ObjectPtr>& th
     // e.g. extrusion is hidden(h=0) but sketch is chosen
     if (theForceRedisplay || theObjects.find(aCurrentFeature) != theObjects.end()) {
       aCustomized = myWorkshop->module()->customizeObject(aCurrentFeature,
-                                           ModuleBase_IModule::CustomizeDependedAndResults, false);
+                                           ModuleBase_IModule::CustomizeArguments, false);
+      aCustomized = myWorkshop->module()->customizeObject(aCurrentFeature,
+                                           ModuleBase_IModule::CustomizeResults, false);
       aCustomized = myWorkshop->module()->customizeObject(aCurrentFeature,
                                            ModuleBase_IModule::CustomizeHighlightedObjects, false);
     }