summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNinad Sathaye <ninad@nanorex.com>2008-09-16 22:25:49 +0000
committerNinad Sathaye <ninad@nanorex.com>2008-09-16 22:25:49 +0000
commitf46388d97296e9d89433364bc0636a44c051da8d (patch)
tree24b8301c826a5e7d8c792bd9df0548a8fd5f6fc1
parent985adf8bc45445d6bef8bfa8681b5f797392b2fc (diff)
downloadnanoengineer-theirix-f46388d97296e9d89433364bc0636a44c051da8d.tar.gz
nanoengineer-theirix-f46388d97296e9d89433364bc0636a44c051da8d.zip
ported to new command API
-rw-r--r--cad/src/commands/ColorScheme/ColorScheme_Command.py49
1 files changed, 28 insertions, 21 deletions
diff --git a/cad/src/commands/ColorScheme/ColorScheme_Command.py b/cad/src/commands/ColorScheme/ColorScheme_Command.py
index 532fde211..5f65f5cfc 100644
--- a/cad/src/commands/ColorScheme/ColorScheme_Command.py
+++ b/cad/src/commands/ColorScheme/ColorScheme_Command.py
@@ -11,6 +11,7 @@ from command_support.EditCommand import EditCommand
from utilities.constants import red
from commands.ColorScheme.ColorScheme_PropertyManager import ColorScheme_PropertyManager
+from utilities.GlobalPreferences import USE_COMMAND_STACK
# == GraphicsMode part
@@ -31,6 +32,9 @@ class ColorScheme_Command(EditCommand):
"""
# class constants
+ #Temporary attr 'command_porting_status. See baseCommand for details.
+ command_porting_status = None #fully ported.
+
# not sure which class should it inherit
commandName = 'COLOR_SCHEME'
@@ -39,37 +43,40 @@ class ColorScheme_Command(EditCommand):
command_level = CL_GLOBAL_PROPERTIES
GraphicsMode_class = ColorScheme_GraphicsMode
-
+ PM_class = ColorScheme_PropertyManager
+
command_can_be_suspended = False
command_should_resume_prevMode = True
command_has_its_own_PM = True
flyoutToolbar = None
+
+ if not USE_COMMAND_STACK:
- def init_gui(self):
- """
- Initialize GUI for this mode
- """
-
-
- if self.propMgr is None:
- self.propMgr = ColorScheme_PropertyManager(self)
- #@bug BUG: following is a workaround for bug 2494.
- #This bug is mitigated as propMgr object no longer gets recreated
- #for modes -- niand 2007-08-29
- changes.keep_forever(self.propMgr)
+ def init_gui(self):
+ """
+ Initialize GUI for this mode
+ """
- self.propMgr.show()
-
- def restore_gui(self):
- """
- Restore the GUI
- """
+ if self.propMgr is None:
+ self.propMgr = ColorScheme_PropertyManager(self)
+ #@bug BUG: following is a workaround for bug 2494.
+ #This bug is mitigated as propMgr object no longer gets recreated
+ #for modes -- niand 2007-08-29
+ changes.keep_forever(self.propMgr)
+
+ self.propMgr.show()
+
- if self.propMgr is not None:
- self.propMgr.close()
+ def restore_gui(self):
+ """
+ Restore the GUI
+ """
+
+ if self.propMgr is not None:
+ self.propMgr.close()