From: vsv Date: Mon, 13 Oct 2014 10:51:40 +0000 (+0400) Subject: Add group operation icon, fix creation of Attribute selection, clear Selection in... X-Git-Tag: V_0.5~99 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6df360fa0e2593dd3a8d45a0e6368ad60c88e681;p=modules%2Fshaper.git Add group operation icon, fix creation of Attribute selection, clear Selection in NewGeom module on deactivation. --- diff --git a/src/FeaturesPlugin/plugin-Features.xml b/src/FeaturesPlugin/plugin-Features.xml index bcd23c7e1..749941fca 100644 --- a/src/FeaturesPlugin/plugin-Features.xml +++ b/src/FeaturesPlugin/plugin-Features.xml @@ -12,7 +12,7 @@ + icon=":icons/shape_group.png"> diff --git a/src/Model/Model_Data.cpp b/src/Model/Model_Data.cpp index b9bb03a31..c76a2f26f 100644 --- a/src/Model/Model_Data.cpp +++ b/src/Model/Model_Data.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,6 +74,8 @@ void Model_Data::addAttribute(const std::string& theID, const std::string theAtt anAttr = new Model_AttributeString(anAttrLab); } else if (theAttrType == ModelAPI_AttributeReference::type()) { anAttr = new Model_AttributeReference(anAttrLab); + } else if (theAttrType == ModelAPI_AttributeSelection::type()) { + anAttr = new Model_AttributeSelection(anAttrLab); } else if (theAttrType == ModelAPI_AttributeRefAttr::type()) { anAttr = new Model_AttributeRefAttr(anAttrLab); } else if (theAttrType == ModelAPI_AttributeRefList::type()) { diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 412407827..831144290 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -157,6 +157,13 @@ bool NewGeom_Module::deactivateModule(SUIT_Study* theStudy) aViewAct->setEnabled(false); } + // Delete selector because it has to be redefined on next activation + if (mySelector) { + myProxyViewer->setSelector(0); + delete mySelector; + mySelector = 0; + } + //myWorkshop->contextMenuMgr()->disconnectViewer(); return LightApp_Module::deactivateModule(theStudy); } diff --git a/src/NewGeom/NewGeom_SalomeViewer.cpp b/src/NewGeom/NewGeom_SalomeViewer.cpp index 9049d0cf6..d9ce85feb 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.cpp +++ b/src/NewGeom/NewGeom_SalomeViewer.cpp @@ -51,6 +51,8 @@ void NewGeom_SalomeViewer::setSelector(NewGeom_OCCSelector* theSel) } } mySelector = theSel; + if (!mySelector) + return; OCCViewer_Viewer* aViewer = mySelector->viewer(); SUIT_ViewManager* aMgr = aViewer->getViewManager(); diff --git a/src/PartSet/PartSet_icons.qrc b/src/PartSet/PartSet_icons.qrc index 53d339a23..63e9b6e5e 100644 --- a/src/PartSet/PartSet_icons.qrc +++ b/src/PartSet/PartSet_icons.qrc @@ -25,5 +25,6 @@ icons/length.png icons/distance.png icons/radius_constr.png + icons/shape_group.png diff --git a/src/PartSet/icons/shape_group.png b/src/PartSet/icons/shape_group.png new file mode 100644 index 000000000..bb2ff516d Binary files /dev/null and b/src/PartSet/icons/shape_group.png differ