def editStructure(self, struct = None): EditCommand.editStructure(self, struct) if self.hasValidStructure(): #When the structure (segment) is finalized (after the modifications) #it will be added to the original NanotubeGroup to which it belonged #before we began editing (modifying) it. self._parentNanotubeGroup = self.struct.getNanotubeGroup() #Set the endpoints #@ DOES THIS DO ANYTHING? I don't think so. --Mark 2008-04-01 #@endPoint1, endPoint2 = self.struct.nanotube.getEndPoints() #@params_for_propMgr = (endPoint1, endPoint2) #TODO 2008-03-25: better to get all parameters from self.struct and #set it in propMgr? This will mostly work except that reverse is #not true. i.e. we can not specify same set of params for #self.struct.setProps ...because endPoint1 and endPoint2 are derived. #by the structure when needed. Commenting out following line of code self.propMgr.setParameters(self.struct.getProps()) #Store the previous parameters. Important to set it after you #set nanotube attrs in the propMgr. #self.previousParams is used in self._previewStructure and #self._finalizeStructure to check if self.struct changed. self.previousParams = self._gatherParameters() self._updateHandleList() self.updateHandlePositions() return
def editStructure(self, struct=None): """ Overrides EditCommand.editStructure method. Provides a way to edit an existing structure. This implements a topLevel command that the client can execute to edit an existing object(i.e. self.struct) that it wants. Example: If its a plane edit controller, this method will be used to edit an object of class Plane. This method also creates a propMgr objects if it doesn't exist and shows this property manager @see: L{self.createStructure} (another top level command that facilitates creation of a model object created by this editCommand @see: L{Plane.edit} and L{Plane_EditCommand._createPropMgrObject} """ if struct is not None: #Should we always unpick the structure while editing it? #Makes sense for editing a Cnt. If this is problematic, the #following should be done in the subclasses that need this. if hasattr(struct, 'picked') and struct.picked: struct.unpick() EditCommand.editStructure(self, struct)
def editStructure(self, struct = None): """ Overrides EditCommand.editStructure method. Provides a way to edit an existing structure. This implements a topLevel command that the client can execute to edit an existing object(i.e. self.struct) that it wants. Example: If its a plane edit controller, this method will be used to edit an object of class Plane. This method also creates a propMgr objects if it doesn't exist and shows this property manager @see: L{self.createStructure} (another top level command that facilitates creation of a model object created by this editCommand @see: L{Plane.edit} and L{Plane_EditCommand._createPropMgrObject} """ if struct is not None: #Should we always unpick the structure while editing it? #Makes sense for editing a Dna. If this is problematic, the #following should be done in the subclasses that need this. if hasattr(struct, 'picked') and struct.picked: struct.unpick() EditCommand.editStructure(self, struct)
def editStructure(self, struct = None): """ """ EditCommand.editStructure(self, struct) if self.hasValidStructure(): self._updatePropMgrParams() #Store the previous parameters. Important to set it after you #set attrs in the propMgr. #self.previousParams is used in self._previewStructure and #self._finalizeStructure to check if self.struct changed. self.previousParams = self._gatherParameters()
def editStructure(self, struct=None): """ """ EditCommand.editStructure(self, struct) if self.hasValidStructure(): self._updatePropMgrParams() #Store the previous parameters. Important to set it after you #set attrs in the propMgr. #self.previousParams is used in self._previewStructure and #self._finalizeStructure to check if self.struct changed. self.previousParams = self._gatherParameters()
def editStructure(self, struct = None): """ Edit the structure @param struct: structure to be edited (in this case its a strand chunk) @type struct: chunk or None (this will change post dna data model) """ EditCommand.editStructure(self, struct) if self.hasValidStructure(): self._updatePropMgrParams() #For Rattlesnake, we do not support resizing of PAM5 model. #So don't append the exprs handles to the handle list (and thus #don't draw those handles. See self.model_changed() isStructResizable, why_not = self.hasResizableStructure() if not isStructResizable: self.handles = [] else: self._updateHandleList() self.updateHandlePositions()
def editStructure(self, struct=None): """ Edit the structure @param struct: structure to be edited (in this case its a strand chunk) @type struct: chunk or None (this will change post dna data model) """ EditCommand.editStructure(self, struct) if self.hasValidStructure(): self._updatePropMgrParams() #For Rattlesnake, we do not support resizing of PAM5 model. #So don't append the exprs handles to the handle list (and thus #don't draw those handles. See self.model_changed() isStructResizable, why_not = self.hasResizableStructure() if not isStructResizable: self.handles = [] else: self._updateHandleList() self.updateHandlePositions()
def editStructure(self, struct = None): EditCommand.editStructure(self, struct) if self.hasValidStructure(): #TODO 2008-03-25: better to get all parameters from self.struct and #set it in propMgr? This will mostly work except that reverse is #not true. i.e. we can not specify same set of params for #self.struct.setProps ...because endPoint1 and endPoint2 are derived. #by the structure when needed. self.propMgr.setParameters(self.struct.getProps()) #Store the previous parameters. Important to set it after you #set nanotube attrs in the propMgr. #self.previousParams is used in self._previewStructure and #self._finalizeStructure to check if self.struct changed. self.previousParams = self._gatherParameters() self._updateHandleList() self.updateHandlePositions() return
def editStructure(self, struct=None): EditCommand.editStructure(self, struct) if self.hasValidStructure(): self._updatePropMgrParams() # Store the previous parameters. Important to set it after you # set duplexRise and basesPerTurn attrs in the propMgr. # self.previousParams is used in self._previewStructure and # self._finalizeStructure to check if self.struct changed. self.previousParams = self._gatherParameters() # For Rattlesnake, we do not support resizing of PAM5 model. # So don't append the exprs handles to the handle list (and thus # don't draw those handles. See self.model_changed() isStructResizable, why_not = self.hasResizableStructure() if not isStructResizable: self.handles = [] else: self._updateHandleList() self.updateHandlePositions()
def editStructure(self, struct=None): EditCommand.editStructure(self, struct) if self.hasValidStructure(): self._updatePropMgrParams() #Store the previous parameters. Important to set it after you #set duplexRise and basesPerTurn attrs in the propMgr. #self.previousParams is used in self._previewStructure and #self._finalizeStructure to check if self.struct changed. self.previousParams = self._gatherParameters() #For Rattlesnake, we do not support resizing of PAM5 model. #So don't append the exprs handles to the handle list (and thus #don't draw those handles. See self.model_changed() isStructResizable, why_not = self.hasResizableStructure() if not isStructResizable: self.handles = [] else: self._updateHandleList() self.updateHandlePositions()