Changeset 0f3c22d in sasview for src/sas/qtgui/PlotProperties.py
- Timestamp:
- Jan 16, 2017 6:05:40 AM (8 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 092a3d9
- Parents:
- 239214f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/PlotProperties.py
- Property mode changed from 100755 to 100644
r239214f r0f3c22d 1 1 from PyQt4 import QtGui 2 3 import sas.sasview4 2 5 3 from sas.qtgui.PlotUtilities import COLORS, SHAPES … … 24 22 self._legend = legend 25 23 self._markersize = marker_size if marker_size else 5 26 self.custom_color = False 24 self.custom_color = False if isinstance(self._color, int) else True 27 25 28 26 # Fill out the color combobox … … 68 66 return self.cbColor.currentIndex() 69 67 70 def onColorChange(self , event):68 def onColorChange(self): 71 69 """ 72 70 Pop up the standard Qt color change dialog 73 71 """ 74 72 # Pick up the chosen color 75 self._color = QtGui.QColorDialog.getColor(parent=self)73 proposed_color = QtGui.QColorDialog.getColor(parent=self) 76 74 # Update the text control 77 if self._color.isValid():75 if proposed_color.isValid(): 78 76 # Block currentIndexChanged 79 77 self.cbColor.blockSignals(True) … … 85 83 # Save the color as #RRGGBB 86 84 self.custom_color = True 87 self._color = str( self._color.name())85 self._color = str(proposed_color.name()) 88 86 89 def onColorIndexChange(self , index):87 def onColorIndexChange(self): 90 88 """ 91 89 Dynamically add/remove "Custom" color index … … 96 94 if custom_index > -1: 97 95 self.cbColor.removeItem(custom_index) 98 99 pass # debug hook100 96
Note: See TracChangeset
for help on using the changeset viewer.