restoreAttributeValue(theAttribute, aValid);
blockAttribute(theAttribute, false, isFlushesActived, isAttributeSetInitializedBlocked);
+ /// NDS: The following rows are commented for issue #1452 (to be removed after debug)
+ /// This is not correct to perform it here because it might cause update selection and
+ /// the selection mechanizm will be circled: use the scenario of the bug with preselected point.
// In particular case the results are deleted and called as redisplayed inside of this
// highlight-selection, to they must be flushed as soon as possible.
// Example: selection of group-vertices subshapes with shift pressend on body. Without
// these 4 lines below the application crashes because of left presentations on
// removed results still in the viewer.
- static Events_ID aDeletedEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
+ /*static Events_ID aDeletedEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
static Events_ID aRedispEvent = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY);
Events_Loop::loop()->flush(aDeletedEvent);
Events_Loop::loop()->flush(aRedispEvent);
-
+ */
return aValid;
}
bool aCanCommitOperation = true;
ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
(anOperation);
- if (aFOperation && PartSet_SketcherMgr::isDistanceOperation(aFOperation))
- aCanCommitOperation = setDistanceValueByPreselection(anOperation, myModule->workshop());
+ if (aFOperation && PartSet_SketcherMgr::isDistanceOperation(aFOperation)) {
+ bool aValueAccepted = setDistanceValueByPreselection(anOperation, myModule->workshop(),
+ aCanCommitOperation);
+ if (!aValueAccepted)
+ return isOperationStopped;
+ }
if (aCanCommitOperation)
isOperationStopped = anOperation->commit();
}
bool PartSet_SketcherMgr::setDistanceValueByPreselection(ModuleBase_Operation* theOperation,
- ModuleBase_IWorkshop* theWorkshop)
+ ModuleBase_IWorkshop* theWorkshop,
+ bool& theCanCommitOperation)
{
bool isValueAccepted = false;
+ theCanCommitOperation = false;
ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
(theOperation);
}
anEditor->setCursorPosition(aX, anY);
isValueAccepted = anEditor->showPopupEditor(false);
+ theCanCommitOperation = true;
}
}
}
/// are filled by preseletion
/// \return true if the value is accepted
static bool setDistanceValueByPreselection(ModuleBase_Operation* theOperation,
- ModuleBase_IWorkshop* theWorkshop);
+ ModuleBase_IWorkshop* theWorkshop,
+ bool& theCanCommitOperation);
typedef QMap<FeaturePtr, std::pair<std::set<AttributePtr>, std::set<ResultPtr> > >
FeatureToSelectionMap;