QList<ModuleBase_ModelWidget*> aWidgets = aFactory.getModelWidgets();
foreach (ModuleBase_ModelWidget* aWidget, aWidgets) {
- aWidget->setFeature(myInternalFeature, true);
+ bool isStoreValue = !aFOperation->isEditOperation() &&
+ !aWidget->getDefaultValue().empty() &&
+ !aWidget->isComputedDefault();
+ aWidget->setFeature(myInternalFeature, isStoreValue);
}
ModuleBase_ModelWidget* aFirstWidget = ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget
(aWidgets);
std::shared_ptr<GeomAPI_Pnt2d> thePoint)
{
FeaturePtr aCoincident;
+ if (theFeature.get() == NULL)
+ return aCoincident;
const std::set<AttributePtr>& aRefsList = theFeature->data()->refsToMe();
std::set<AttributePtr>::const_iterator aIt;
QActionsList aActions;
if (aSelected == 1) {
ObjectPtr aObject = aPrsList.first().object();
- std::string aName = aObject->groupName();
- if (myViewerMenu.contains(aName))
- aActions = myViewerMenu[aName];
+ if (aObject.get() != NULL) {
+ std::string aName = aObject->groupName();
+ if (myViewerMenu.contains(aName))
+ aActions = myViewerMenu[aName];
+ }
aActions.append(action("COLOR_CMD"));
} else if (aSelected > 1) {
aActions.append(action("HIDE_CMD"));