From: mpv Date: Wed, 28 Jan 2015 11:33:42 +0000 (+0300) Subject: Issue #387 : do not store the export to GEOM feature in the document X-Git-Tag: V_1.0.0~15^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cee53ac266d48f2b6cff6ffb12b6912c94a7db4d;p=modules%2Fshaper.git Issue #387 : do not store the export to GEOM feature in the document --- diff --git a/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py b/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py index ea030b363..dc4f87de3 100644 --- a/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py +++ b/src/ConnectorPlugin/ConnectorPlugin_ExportFeature.py @@ -24,22 +24,16 @@ class ExportFeature(ModelAPI.ModelAPI_Feature): return ExportFeature.ID() # This feature is action: has no property pannel and executes immideately - # def isAction(self): - # return True + def isAction(self): + return True - def isInHistory(self): - return False + # The action is not placed into the histiry anyway + #def isInHistory(self): + # return False def initAttributes(self): - # This feature has no attributes, but should perform some actions on initialization - aSession = ModelAPI.ModelAPI_Session.get() - self.Part = aSession.activeDocument() - self.geomObjects = [] - self.geompy = geomBuilder.New(salome.myStudy) - - # Export bodies and groups - self.exportBodies() - self.exportGroups() + # This feature has no attributes, it is action + pass def exportBodies(self): # Get all bodies @@ -102,5 +96,12 @@ class ExportFeature(ModelAPI.ModelAPI_Feature): self.geompy.addToStudyInFather(obj[1], aGroup, theGroupName) def execute(self): - # Nothing to execute: all logic would be in the initAttributes + aSession = ModelAPI.ModelAPI_Session.get() + self.Part = aSession.activeDocument() + self.geomObjects = [] + self.geompy = geomBuilder.New(salome.myStudy) + + # Export bodies and groups + self.exportBodies() + #self.exportGroups() pass