if(aFeature.get()) {
AttributeBooleanPtr aBooleanAttr = aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
if(aBooleanAttr.get()) {
- aBooleanAttr->setValue(false);
+ if (ModelAPI_Session::get()->isOperation()) // if this is not undo or redo
+ aBooleanAttr->setValue(false);
// Redisplay object as it is not copy anymore.
ModelAPI_EventCreator::get()->sendUpdated(aRes, aRedispEvent);
}
if(aFeature.get()) {
AttributeBooleanPtr aBooleanAttr = aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
if(aBooleanAttr.get()) {
- aBooleanAttr->setValue(false);
+ if (ModelAPI_Session::get()->isOperation()) // if this is not undo or redo
+ aBooleanAttr->setValue(false);
// Redisplay object as it is not copy anymore.
ModelAPI_EventCreator::get()->sendUpdated(aRes, aRedispEvent);
}
if(aFeature.get()) {
AttributeBooleanPtr aBooleanAttr = aFeature->boolean(SketchPlugin_SketchEntity::COPY_ID());
if(aBooleanAttr.get()) {
- aBooleanAttr->setValue(false);
+ if (ModelAPI_Session::get()->isOperation()) // if this is not undo or redo
+ aBooleanAttr->setValue(false);
// Redisplay object as it is not copy anymore.
ModelAPI_EventCreator::get()->sendUpdated(aRes, aRedispEvent);
}
AttributePtr anAttr = data()->addAttribute(SketchPlugin_SketchEntity::COPY_ID(), ModelAPI_AttributeBoolean::typeId());
anAttr->setIsArgument(false);
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), SketchPlugin_SketchEntity::COPY_ID());
- AttributeBooleanPtr anAttrBool = std::dynamic_pointer_cast<ModelAPI_AttributeBoolean>(anAttr);
- if(anAttr.get()) {
- anAttrBool->setValue(false);
- }
}