]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add group operation icon, fix creation of Attribute selection, clear Selection in...
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 13 Oct 2014 10:51:40 +0000 (14:51 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 13 Oct 2014 10:51:40 +0000 (14:51 +0400)
src/FeaturesPlugin/plugin-Features.xml
src/Model/Model_Data.cpp
src/NewGeom/NewGeom_Module.cpp
src/NewGeom/NewGeom_SalomeViewer.cpp
src/PartSet/PartSet_icons.qrc
src/PartSet/icons/shape_group.png [new file with mode: 0644]

index bcd23c7e170835b084e69b62dfd61e27ee0b534b..749941fcab783ebcd4276b2d6a8bbaf92716d729 100644 (file)
@@ -12,7 +12,7 @@
       <feature id="Group"
         title="Group"
         tooltip="Create a new named collection of geometry entities"
-        icon=":icons/group.png">
+        icon=":icons/shape_group.png">
         <source path="group_widget.xml"/>
       </feature>
     </group>
index b9bb03a3117b05e16a633f530df938c84c2919a3..c76a2f26f8e8f9297e451bc6d400395e2bb45539 100644 (file)
@@ -11,7 +11,7 @@
 #include <Model_AttributeRefList.h>
 #include <Model_AttributeBoolean.h>
 #include <Model_AttributeString.h>
-#include <ModelAPI_AttributeSelection.h>
+#include <Model_AttributeSelection.h>
 #include <Model_Events.h>
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Result.h>
@@ -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()) {
index 412407827058d8722fc4227bd3670c60c29b8743..8311442901c7f0a3f5345abbcdb0d9c6d7985ba1 100644 (file)
@@ -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);
 }
index 9049d0cf6669f026fe6ec1d02077c8f846bb5a72..d9ce85febf901d738fa94427301ce74ddd4c10ca 100644 (file)
@@ -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();
 
index 53d339a23a71308ab48aa25a50330c5b19fb8743..63e9b6e5e49f22dc03e871a8a354e5c2f5ac0dfd 100644 (file)
@@ -25,5 +25,6 @@
      <file>icons/length.png</file>
      <file>icons/distance.png</file>
      <file>icons/radius_constr.png</file>
+     <file>icons/shape_group.png</file>
  </qresource>
  </RCC>
diff --git a/src/PartSet/icons/shape_group.png b/src/PartSet/icons/shape_group.png
new file mode 100644 (file)
index 0000000..bb2ff51
Binary files /dev/null and b/src/PartSet/icons/shape_group.png differ