void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel()
{
- if (isNestedCreateOperation(getCurrentOperation()))
+ if (!isNestedEditOperation(getCurrentOperation()) ||
+ myModule->sketchReentranceMgr()->isInternalEditActive())
return;
// it is necessary to save current selection in order to restore it after the values are modifed
storeSelection();
void PartSet_SketcherMgr::onAfterValuesChangedInPropertyPanel()
{
- if (isNestedCreateOperation(getCurrentOperation()))
+ if (!isNestedEditOperation(getCurrentOperation()) ||
+ myModule->sketchReentranceMgr()->isInternalEditActive())
return;
// it is necessary to restore current selection in order to restore it after the values are modified
restoreSelection();
return aFOperation && !aFOperation->isEditOperation() && isNestedSketchOperation(aFOperation);
}
+bool PartSet_SketcherMgr::isNestedEditOperation(ModuleBase_Operation* theOperation)
+{
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (theOperation);
+ return aFOperation && aFOperation->isEditOperation() && isNestedSketchOperation(aFOperation);
+}
+
bool PartSet_SketcherMgr::isEntity(const std::string& theId)
{
return (theId == SketchPlugin_Line::ID()) ||
//// \return boolean value
static bool isNestedCreateOperation(ModuleBase_Operation* theOperation);
+ /// Returns true if the operation is an edit nested feature one
+ /// \param theOperation a checked operation
+ //// \return boolean value
+ static bool isNestedEditOperation(ModuleBase_Operation* theOperation);
+
/// Returns whether the current operation is a sketch entity - line, point, arc or circle
/// \param theId is an id of object
/// \return a boolean value