Make sketch invalid if external plane selected becomes invalid. And keep it while plane is re-selected.
aResult = aSelector.restore(aContextShape);
bool aWasInvalid = aSelLab.IsAttribute(kINVALID_SELECTION);
setInvalidIfFalse(aSelLab, aResult);
+ if (!aResult)
+ aWasInvalid = false;
TopoDS_Shape aNewShape;
if (aSelLab.FindAttribute(TNaming_NamedShape::GetID(), aNS))
bool isObligatory = !aFactory->isNotObligatory(
theFeature->getKind(), theFeature->data()->id(aSel)) &&
aFactory->isCase(theFeature, theFeature->data()->id(aSel));
- if (isObligatory)
+ if (isObligatory ||
+ // #24260 : sketch plane was selected, but selection becomes wrong, make it invalid
+ (theFeature->getKind() == "Sketch" && aSel->id() == "External"))
aState = ModelAPI_StateInvalidArgument;
}
}
aAction->setData(theId);
int aWBMenu = createMenu(theWBName, -1, -1, 30/*10-Window, 1000 - Help*/);
-#ifdef _DEBUG
- int aItemId =
-#endif
if( theId == "PointCoordinates" )
createMenu(separator(), aWBMenu);
- createMenu(aId, aWBMenu);
+#ifdef _DEBUG
+ int aItemId =
+#endif
+ createMenu(aId, aWBMenu);
if (isAddSeparator)
createMenu(separator(), aWBMenu);