summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNinad Sathaye <ninad@nanorex.com>2008-09-22 18:49:59 +0000
committerNinad Sathaye <ninad@nanorex.com>2008-09-22 18:49:59 +0000
commit704b5ce4223b3eaed41662029eb6739857ce66d3 (patch)
tree94491fd417e27006553024826bec1ef1b0a37689
parent106b98bf1933fb8e60bc668af5909d09291ac10b (diff)
downloadnanoengineer-704b5ce4223b3eaed41662029eb6739857ce66d3.tar.gz
nanoengineer-704b5ce4223b3eaed41662029eb6739857ce66d3.zip
updated command porting status and misc cleanup
-rw-r--r--cad/src/commands/Paste/PasteFromClipboard_Command.py3
-rwxr-xr-xcad/src/commands/PlaneProperties/Plane_EditCommand.py3
-rw-r--r--cad/src/dna/temporary_commands/DnaLineMode.py7
-rw-r--r--cad/src/protein/commands/FixedBBProteinSim/FixedBBProteinSim_Command.py3
-rw-r--r--cad/src/temporary_commands/RotateAboutPoint_Command.py35
5 files changed, 38 insertions, 13 deletions
diff --git a/cad/src/commands/Paste/PasteFromClipboard_Command.py b/cad/src/commands/Paste/PasteFromClipboard_Command.py
index fa62b34d7..ff599b534 100644
--- a/cad/src/commands/Paste/PasteFromClipboard_Command.py
+++ b/cad/src/commands/Paste/PasteFromClipboard_Command.py
@@ -52,8 +52,7 @@ class PasteFromClipboard_Command(BuildAtoms_Command):
by hitting 'Escape' key or pressing 'Done' button in the Paste mode.
"""
#Temporary attr 'command_porting_status. See baseCommand for details.
- command_porting_status = "NOT_PORTED: 2008-09-17: need PM_class, flyout class and need to port model_changed etc"
-
+ command_porting_status = None #fully ported
commandName = 'PASTE'
featurename = "Paste From Clipboard"
diff --git a/cad/src/commands/PlaneProperties/Plane_EditCommand.py b/cad/src/commands/PlaneProperties/Plane_EditCommand.py
index ff17cd3b0..ff8619844 100755
--- a/cad/src/commands/PlaneProperties/Plane_EditCommand.py
+++ b/cad/src/commands/PlaneProperties/Plane_EditCommand.py
@@ -45,6 +45,9 @@ class Plane_EditCommand(EditCommand):
The editCommand, depending on what client code needs it to do, may create
a new plane or it may be used for an existing plane.
"""
+
+ #Temporary attr 'command_porting_status. See baseCommand for details.
+ command_porting_status = None #fully ported
#@NOTE: self.struct is the Plane object
diff --git a/cad/src/dna/temporary_commands/DnaLineMode.py b/cad/src/dna/temporary_commands/DnaLineMode.py
index 448f19772..694b2e7de 100644
--- a/cad/src/dna/temporary_commands/DnaLineMode.py
+++ b/cad/src/dna/temporary_commands/DnaLineMode.py
@@ -56,13 +56,8 @@ class DnaLine_GM( Line_GraphicsMode ):
if self.command.mouseClickLimit is None:
if len(self.command.mouseClickPoints) == 2:
- self.endPoint2 = None
-
+ self.endPoint2 = None
self.command.createStructure()
- #DISABLED AS OF 2008-01-11. (Implementation changed --
- #See DnaDuplex_EditCommand.createStructure for new
- #implementaion)
- ##self.command.callback_addSegments()
self.glpane.gl_update()
return
diff --git a/cad/src/protein/commands/FixedBBProteinSim/FixedBBProteinSim_Command.py b/cad/src/protein/commands/FixedBBProteinSim/FixedBBProteinSim_Command.py
index 3b35798f7..a55ab7d62 100644
--- a/cad/src/protein/commands/FixedBBProteinSim/FixedBBProteinSim_Command.py
+++ b/cad/src/protein/commands/FixedBBProteinSim/FixedBBProteinSim_Command.py
@@ -29,6 +29,9 @@ class FixedBBProteinSim_Command(EditCommand):
"""
Class for fixed backbone rosetta sequence design
"""
+ #Temporary attr 'command_porting_status. See baseCommand for details.
+ command_porting_status = None #fully ported
+
# class constants
GraphicsMode_class = FixedBBProteinSim_GraphicsMode
diff --git a/cad/src/temporary_commands/RotateAboutPoint_Command.py b/cad/src/temporary_commands/RotateAboutPoint_Command.py
index 28bcb0ad6..eefd4a34f 100644
--- a/cad/src/temporary_commands/RotateAboutPoint_Command.py
+++ b/cad/src/temporary_commands/RotateAboutPoint_Command.py
@@ -85,10 +85,15 @@ class RotateAboutPoint_GraphicsMode(Line_GraphicsMode):
if not USE_COMMAND_STACK:
self.command.restore_gui()
else:
- print_compact_stack("bug: %s.leftUp doesn't handle the case" \
- "where mouseclicklimit is not specified. Ideally it should" \
- "call most of the code in self.command_will_exit")%(self)
-
+ try:
+ self.command._f_results_for_caller_and_prepare_for_new_input()
+ except AttributeError:
+ print_compact_traceback(
+ "bug: command %s has no attr"\
+ "'_f_results_for_caller_and_prepare_for_new_input'.")
+ self.command.mouseClickPoints = []
+ self.resetVariables()
+
self.glpane.gl_update()
return
@@ -124,7 +129,7 @@ class RotateAboutPoint_GraphicsMode(Line_GraphicsMode):
class RotateAboutPoint_Command(Line_Command):
#Temporary attr 'command_porting_status. See baseCommand for details.
- command_porting_status = "PARTIAL: GraphicsMode.leftUp calls restore_gui and corre case in new command API not handled"
+ command_porting_status = None #fully ported
GraphicsMode_class = RotateAboutPoint_GraphicsMode
@@ -206,6 +211,26 @@ class RotateAboutPoint_Command(Line_Command):
# note: superclass Line_Command.init_gui sets self._results_callback,
# and superclass restore_gui calls it with this method's return value
return ()
+
+
+ def _f_results_for_caller_and_prepare_for_new_input(self):
+ """
+ This is called only from GraphicsMode.leftUp()
+ Give results for the caller of this request command and then prepare for
+ next input (mouse click points) from the user. Note that this is called
+ from RotateAboutPoint_GraphiceMode.leftUp() only when the mouseClickLimit
+ is not specified (i.e. the command is not exited automatically after
+ 'n' number of mouseclicks)
+
+ @see: RotateAboutPoint_GraphiceMode.leftUp()
+ """
+ if self._results_callback:
+ # note: see comment in command_will_exit version of this code
+ params = self._results_for_request_command_caller()
+ self._results_callback( params)
+
+ self.command.mouseClickPoints = []
+ self.graphiceMode.resetVariables()
pass # end of class RotateAboutPoint_Command