const QList<ModuleBase_ModelWidget*>& aWidgets = aPanel->modelWidgets();
QList<ModuleBase_ModelWidget*>::const_iterator anIt = aWidgets.begin(), aLast = aWidgets.end();
bool aFoundWidget = false;
- bool aFoundNonObligatory = false;
- for (; anIt != aLast && !aFoundNonObligatory; anIt++) {
- aFoundWidget = aFoundWidget || *anIt == anActiveWidget;
+ bool aFoundObligatory = false;
+ for (; anIt != aLast && !aFoundObligatory; anIt++) {
if (!aFoundWidget)
- continue;
- aFoundNonObligatory = !(*anIt)->isObligatory();
+ aFoundWidget = *anIt == anActiveWidget;
+ else
+ aFoundObligatory = (*anIt)->isObligatory();
}
- if (!aFoundNonObligatory)
+ if (!aFoundObligatory)
myRestartingMode = RM_Forbided;
}
}
// before and after the values modification.
// Moreother, this check avoids customize and redisplay presentation if the presentable
// parameter is changed.
- /*ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+ ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObject);
if (aResult.get() != NULL) {
Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(aAISIO);
if (!aShapePrs.IsNull()) {
return;
}
}
- }*/
+ }
// Customization of presentation
FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
if (aFeature.get() != NULL) {