summaryrefslogtreecommitdiff
path: root/cad/src/cnt/commands/InsertNanotube
diff options
context:
space:
mode:
authorNinad Sathaye <ninad@nanorex.com>2008-09-18 15:00:47 +0000
committerNinad Sathaye <ninad@nanorex.com>2008-09-18 15:00:47 +0000
commit4d58ef2d35345858491e1297a456301357b6d498 (patch)
treea4e3db1fe57903d7185f822d7e663c24316432d1 /cad/src/cnt/commands/InsertNanotube
parentc5c8d30c39fab98c0980b115e636344520d497c7 (diff)
downloadnanoengineer-theirix-4d58ef2d35345858491e1297a456301357b6d498.tar.gz
nanoengineer-theirix-4d58ef2d35345858491e1297a456301357b6d498.zip
ported more commands to USE_COMMAND_STACK; changed the default porting status in baseCommand to UNKOWN. (fully ported commands will have that value as 'None'
Diffstat (limited to 'cad/src/cnt/commands/InsertNanotube')
-rw-r--r--cad/src/cnt/commands/InsertNanotube/InsertNanotube_EditCommand.py38
-rw-r--r--cad/src/cnt/commands/InsertNanotube/InsertNanotube_PropertyManager.py1
2 files changed, 24 insertions, 15 deletions
diff --git a/cad/src/cnt/commands/InsertNanotube/InsertNanotube_EditCommand.py b/cad/src/cnt/commands/InsertNanotube/InsertNanotube_EditCommand.py
index e550cd8a7..d9d8d504e 100644
--- a/cad/src/cnt/commands/InsertNanotube/InsertNanotube_EditCommand.py
+++ b/cad/src/cnt/commands/InsertNanotube/InsertNanotube_EditCommand.py
@@ -35,7 +35,6 @@ from utilities.exception_classes import PluginBug, UserError
from cnt.commands.InsertNanotube.InsertNanotube_PropertyManager import InsertNanotube_PropertyManager
from utilities.constants import gensym
-from utilities.constants import black
from cnt.temporary_commands.NanotubeLineMode import NanotubeLine_GM
@@ -59,7 +58,7 @@ class InsertNanotube_EditCommand(EditCommand):
"""
#Temporary attr 'command_porting_status. See baseCommand for details.
- command_porting_status = "PARTIAL: 2008-09-08:mostly done, but needs a look. see if refactoring to implement update_* methods is absolutely essential"
+ command_porting_status = None #fully ported
#Graphics Mode set to CntLine graphics mode
GraphicsMode_class = NanotubeLine_GM
@@ -148,6 +147,21 @@ class InsertNanotube_EditCommand(EditCommand):
self.flyoutToolbar.insertNanotubeAction.setChecked(False)
self._segmentList = []
+
+ def command_enter_flyout(self):
+ """
+ Overrides superclass method.
+ @see: basecommand.command_enter_flyout() for documentation.
+ """
+ self._init_gui_flyout_action( 'insertNanotubeAction' )
+
+ def command_exit_flyout(self):
+ """
+ Overrides superclass method.
+ @see: basecommand.command_exit_flyout() for documentation.
+ """
+ if self.flyoutToolbar:
+ self.flyoutToolbar.insertNanotubeAction.setChecked(False)
#START New command API methods==============================================
@@ -177,20 +191,16 @@ class InsertNanotube_EditCommand(EditCommand):
_superclass.command_will_exit(self)
- def command_enter_flyout(self):
+ def _getFlyoutToolBarActionAndParentCommand(self):
"""
- Overrides superclass method.
- @see: basecommand.command_enter_flyout() for documentation.
- """
- self._init_gui_flyout_action( 'insertNanotubeAction' )
-
- def command_exit_flyout(self):
+ See superclass for documentation.
+ @see: self.command_update_flyout()
"""
- Overrides superclass method.
- @see: basecommand.command_exit_flyout() for documentation.
- """
- if self.flyoutToolbar:
- self.flyoutToolbar.insertNanotubeAction.setChecked(False)
+ flyoutActionToCheck = 'insertNanotubeAction'
+ parentCommandName = None
+ return flyoutActionToCheck, parentCommandName
+
+
#START New command API methods==============================================
diff --git a/cad/src/cnt/commands/InsertNanotube/InsertNanotube_PropertyManager.py b/cad/src/cnt/commands/InsertNanotube/InsertNanotube_PropertyManager.py
index f058c67ec..4bc155603 100644
--- a/cad/src/cnt/commands/InsertNanotube/InsertNanotube_PropertyManager.py
+++ b/cad/src/cnt/commands/InsertNanotube/InsertNanotube_PropertyManager.py
@@ -482,7 +482,6 @@ class InsertNanotube_PropertyManager( DnaOrCnt_PropertyManager):
@type inIndex: int
"""
self.nanotube.setType(str(type))
- print "Bond Length =", self.nanotube.getBondLength()
self.bondLengthDoubleSpinBox.setValue(self.nanotube.getBondLength())
#self.bondLengthDoubleSpinBox.setValue(ntBondLengths[inIndex])