summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Smith <bruce@nanorex.com>2009-01-19 21:20:38 +0000
committerBruce Smith <bruce@nanorex.com>2009-01-19 21:20:38 +0000
commite707d3b2377a31346a30697272dd5151bf4a7cec (patch)
treefe3e5aeeab29b5bd78681b5cd07217530152d394
parentf49c3f98e9c2aebc59fb3d7c01af752230400341 (diff)
downloadnanoengineer-e707d3b2377a31346a30697272dd5151bf4a7cec.tar.gz
nanoengineer-e707d3b2377a31346a30697272dd5151bf4a7cec.zip
removed unnecessary changeapp call; minor refactoring
-rwxr-xr-xcad/src/commands/ElementColors/elementColors.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/cad/src/commands/ElementColors/elementColors.py b/cad/src/commands/ElementColors/elementColors.py
index 4afbe6097..a0ccd8a17 100755
--- a/cad/src/commands/ElementColors/elementColors.py
+++ b/cad/src/commands/ElementColors/elementColors.py
@@ -350,7 +350,7 @@ class elementColors(QDialog, Ui_ElementColorsDialog):
Slot for Preview button. Applies color changes for the current element in the GLPane,
allowing the user to preview the color changes in the model before saving.
"""
- self.w.glpane.gl_update()
+ self._updateModelDisplay()
def restore_current_color(self): # mark 060129.
"""
@@ -358,7 +358,7 @@ class elementColors(QDialog, Ui_ElementColorsDialog):
original (previous) color before any color change was made.
"""
self.update_sliders_and_spinboxes(RGBf_to_QColor(self.original_color))
- self.w.glpane.gl_update()
+ self._updateModelDisplay()
def ok(self):
## if self.isElementModified and not self.isFileSaved:
@@ -370,6 +370,7 @@ class elementColors(QDialog, Ui_ElementColorsDialog):
#Save the color preference
self.elemTable.close()
+ self._updateModelDisplay() #bruce 090119 bugfix
self.accept()
@@ -377,7 +378,7 @@ class elementColors(QDialog, Ui_ElementColorsDialog):
def reject(self):
"""
If elements modified or external file loaded, restore
- current pref to originial since our dialog is reused
+ current pref to original since our dialog is reused
"""
if self.isElementModified or self.fileName:
self.elemTable.resetElemTable(self.oldTable)
@@ -390,9 +391,9 @@ class elementColors(QDialog, Ui_ElementColorsDialog):
"""
Update model display
"""
- for mol in self.w.assy.molecules:
- mol.changeapp(1)
-
+ #bruce 090119 removed changeapp calls, not needed for a long time
+ # (due to PeriodicTable.color_change_counter);
+ # then replaced other calls of gl_update with calls of this method
self.w.glpane.gl_update()