Salome HOME
Make same planes cannot be used twice in partition tool
[modules/shaper.git] / src / XGUI / XGUI_Displayer.cpp
index d80df1ba40566297de77b1055556906334306953..978d6154936421e9f0332bbd4520b7a4e65fb3b4 100644 (file)
@@ -322,7 +322,16 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer)
         arg(!isEqualShapes || isCustomized).arg(isEqualShapes).arg(isCustomized).toStdString().c_str());
     #endif
     if (!isEqualShapes || isCustomized) {
+      /// if shapes are equal and presentation are customized, selection should be restored
+      bool aNeedToRestoreSelection = isEqualShapes && isCustomized;
+      if (aNeedToRestoreSelection)
+        myWorkshop->module()->storeSelection();
+
       aContext->Redisplay(aAISIO, false);
+
+      if (aNeedToRestoreSelection)
+        myWorkshop->module()->restoreSelection();
+
       aRedisplayed = true;
       #ifdef DEBUG_FEATURE_REDISPLAY
         qDebug("  Redisplay happens");