当前位置: 首页>>代码示例>>Python>>正文


Python EditCommand._finalizeStructure方法代码示例

本文整理汇总了Python中command_support.EditCommand.EditCommand._finalizeStructure方法的典型用法代码示例。如果您正苦于以下问题:Python EditCommand._finalizeStructure方法的具体用法?Python EditCommand._finalizeStructure怎么用?Python EditCommand._finalizeStructure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在command_support.EditCommand.EditCommand的用法示例。


在下文中一共展示了EditCommand._finalizeStructure方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _finalizeStructure

# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import _finalizeStructure [as 别名]
 def _finalizeStructure(self):
     """
     Overrides EditCommand._finalizeStructure. 
     @see: EditCommand.preview_or_finalize_structure
     """     
     if self.struct is not None:
         #@TODO 2008-03-19:Should we always do this even when strand sequence
         #is not changed?? Should it waste time in comparing the current 
         #sequence with a previous one? Assigning sequence while leaving the 
         #command will be slow for large files.Need to be optimized if 
         #problematic.
         #What if a flag is set in self.propMgr.updateSequence() when it 
         #updates the seq for the second time and we check that here. 
         #Thats  not good if the method gets called multiple times for some 
         #reason other than the user entered sequence. So not doing here. 
         #Better fix would be to check if sequence gets changed (textChanged)
         #in DnaSequence editor class .... Need to be revised
         EditCommand._finalizeStructure(self) 
         self._updateStrandSequence_if_needed()
         self.assignStrandSequence()
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:22,代码来源:DnaStrand_EditCommand.py

示例2: _finalizeStructure

# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import _finalizeStructure [as 别名]
    def _finalizeStructure(self):
        """
        Overrides EditCommand._finalizeStructure.
        This method also makes sure that the DnaGroup is not empty ..if its
        empty it deletes it.
        @see: dna_model.DnaGroup.isEmpty
        @see: EditCommand.preview_or_finalize_structure
        """
        if self.struct is not None:
            if self.struct.isEmpty():
                #Don't keep empty DnaGroup Fixes bug 2603.
                self._removeStructure()
                self.win.win_update()
            else:
                EditCommand._finalizeStructure(self)

        if self.struct is not None:
            #Make sure that he DnaGroup in the Model Tree is in collapsed state
            #after finalizing the structure.
            #DON'T DO self.struct.open = False in the above conditional
            #because the EditCommand._finalizeStructure may have assigned
            #'None' for 'self.struct'!
            self.struct.open = False
开发者ID:alaindomissy,项目名称:nanoengineer,代码行数:25,代码来源:BuildDna_EditCommand.py

示例3: _finalizeStructure

# 需要导入模块: from command_support.EditCommand import EditCommand [as 别名]
# 或者: from command_support.EditCommand.EditCommand import _finalizeStructure [as 别名]
 def _finalizeStructure(self):
     """
     Finalize the structure. This is a step just before calling Done method.
     to exit out of this command. Subclasses may overide this method
     @see: EditCommand_PM.ok_btn_clicked
     @see: DnaSegment_EditCommand where this method is overridden. 
     """
     #The following can happen in this case: User creates first duplex, 
     #Now clicks inside 3D workspace to define the first point of the 
     #next duplex. Now moves the mouse to draw dna rubberband line. 
     #and then its 'Done' When it does that, it has modified the 
     #'number of base pairs' value in the PM and then it uses that value 
     #to modify self.struct ...which is the first segment user created!
     #In order to avoid this, either self.struct should be set to None after
     #its appended to the segment list (in self.createStructure) 
     #Or it should compute the number of base pairs each time instead of 
     #relying on the corresponding value in the PM. The latter is not 
     #advisable if we support modifying the number of base pairs from the 
     #PM (and hitting preview) while in DnaDuplex command. 
     #In the mean time, I think this solution will always work. 
     if len(self.mouseClickPoints) == 1:
         return
     else:
         EditCommand._finalizeStructure(self)
开发者ID:ematvey,项目名称:NanoEngineer-1,代码行数:26,代码来源:DnaDuplex_EditCommand.py


注:本文中的command_support.EditCommand.EditCommand._finalizeStructure方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。