From: vsv Date: Fri, 25 Nov 2016 11:56:22 +0000 (+0300) Subject: Fix Field GUI bugs X-Git-Tag: V_2.6.0~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a9ce2c0e7000a95da283f96bbb64d30cedb7c8c;p=modules%2Fshaper.git Fix Field GUI bugs --- diff --git a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp index 273683e26..faf974a2f 100644 --- a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp +++ b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp @@ -468,9 +468,9 @@ bool CollectionPlugin_WidgetField::restoreValueCustom() DataPtr aData = myFeature->data(); AttributeSelectionListPtr aSelList = aData->selectionList(CollectionPlugin_Field::SELECTED_ID()); - if (!aSelList->isInitialized()) - return false; std::string aTypeStr = aSelList->selectionType(); + if (aTypeStr == "") + return false; // The attribute is not initialized myShapeTypeCombo->setCurrentIndex(getSelectionType(aTypeStr)); // Get number of components diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index b99cfdd6b..5ec4d3f08 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include @@ -471,6 +472,7 @@ void XGUI_ContextMenuMgr::buildObjBrowserMenu() myObjBrowserMenus[ModelAPI_ResultBody::group()] = aList; // Group menu myObjBrowserMenus[ModelAPI_ResultGroup::group()] = aList; + myObjBrowserMenus[ModelAPI_ResultField::group()] = aList; // Result part menu myObjBrowserMenus[ModelAPI_ResultPart::group()] = aList; //------------------------------------- @@ -519,6 +521,7 @@ void XGUI_ContextMenuMgr::buildViewerMenu() myViewerMenu[ModelAPI_ResultBody::group()] = aList; // Group menu myViewerMenu[ModelAPI_ResultGroup::group()] = aList; + myViewerMenu[ModelAPI_ResultField::group()] = aList; //------------------------------------- }