Handle(AIS_InteractiveObject) anAIS = anObject->impl<Handle(AIS_InteractiveObject)>();
if (!anAIS.IsNull()) {
emit beforeObjectErase(theObject, anObject);
- aContext->Remove(anAIS);
+ aContext->Remove(anAIS, false/*update viewer*/);
aErased = true;
}
}
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");
Handle(AIS_InteractiveObject) anIO = aAISObj->impl<Handle(AIS_InteractiveObject)>();
if (!anIO.IsNull()) {
emit beforeObjectErase(aObj, aAISObj);
- aContext->Remove(anIO, false);
+ aContext->Remove(anIO, false/*update viewer*/);
aErased = true;
}
}