summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNinad Sathaye <ninad@nanorex.com>2008-03-19 05:55:52 +0000
committerNinad Sathaye <ninad@nanorex.com>2008-03-19 05:55:52 +0000
commit0e814d1e31bd39ac94e79af923a3c2c1e979c203 (patch)
tree541fbe2092330bba5b85371ad951e76549e0a17a
parentb411e6dc90af997c2a235ec0606de8ad8b3833e6 (diff)
downloadnanoengineer-theirix-0e814d1e31bd39ac94e79af923a3c2c1e979c203.tar.gz
nanoengineer-theirix-0e814d1e31bd39ac94e79af923a3c2c1e979c203.zip
fixed bug 2682 -- flyout toolbar not updated in some cases after file> Open, fileClose etc
-rwxr-xr-xcad/src/commandToolbar/CommandToolbar.py19
-rwxr-xr-xcad/src/commands/SelectChunks/SelectChunks_Command.py4
2 files changed, 23 insertions, 0 deletions
diff --git a/cad/src/commandToolbar/CommandToolbar.py b/cad/src/commandToolbar/CommandToolbar.py
index 3e231be09..64c32949d 100755
--- a/cad/src/commandToolbar/CommandToolbar.py
+++ b/cad/src/commandToolbar/CommandToolbar.py
@@ -135,6 +135,25 @@ class CommandToolbar(Ui_CommandToolbar):
control area.
"""
self._updateFlyoutToolBar(btnId, self.in_a_mode)
+
+ def resetToDefaultState(self):
+ """
+ Reset the Command Toolbar to the default state. i.e. the state which
+ the user sees when NE1 is started -- Build button in the control area
+ of the toolbar checked and the flyout toolbar on the right hand side
+ shows the sub-menu items of the build control area.
+ @see: SelectChunks_Command.init_gui() which calls this while entering
+ the NE1 default select chunks mode. (fixes bugs like 2682)
+
+ """
+ self.cmdButtonGroup.button(0).setChecked(True)
+ #Now update the command toolbar (flyout area) such that it shows
+ #the sub-menu items of the control button
+ self._setControlButtonMenu_in_flyoutToolbar(self.cmdButtonGroup.checkedId())
+
+ ##FYI Same effect can be acheived by using the following commented out
+ ##code. But its not obvious so not using it.
+ ###self.updateCommandToolbar(None, None, entering = False)
def _updateFlyoutToolBar(self, btnId =0, in_a_mode = False):
"""
diff --git a/cad/src/commands/SelectChunks/SelectChunks_Command.py b/cad/src/commands/SelectChunks/SelectChunks_Command.py
index 4e64907d0..e57e740db 100755
--- a/cad/src/commands/SelectChunks/SelectChunks_Command.py
+++ b/cad/src/commands/SelectChunks/SelectChunks_Command.py
@@ -71,6 +71,10 @@ class SelectChunks_basicCommand(Select_basicCommand):
"""
"""
self.w.toolsSelectMoleculesAction.setChecked(True)
+ #Fixes bugs like 2682 where command toolbar (the flyout toolbar
+ #portion) doesn't get updated even when in the default mode.
+ self.win.commandToolbar.resetToDefaultState()
+
def restore_gui(self):
"""