aboutsummaryrefslogtreecommitdiff
path: root/components/color.py
diff options
context:
space:
mode:
authortassaron2017-06-08 16:50:48 -0400
committertassaron2017-06-08 16:50:48 -0400
commitbb1e54b31eb6157ef041764cfccd60484a0e02d8 (patch)
treecbd2aed7edd1b6c429437929c03ec8cdb9c67e33 /components/color.py
parent6079c4fd24aecf2ecfed0528c1427a74d596993f (diff)
saved preset titles, code clean-ups
componentList drag'n'drop disabled for now; will work on it in another branch
Diffstat (limited to 'components/color.py')
-rw-r--r--components/color.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/color.py b/components/color.py
index b13f54e..a86927b 100644
--- a/components/color.py
+++ b/components/color.py
@@ -70,7 +70,7 @@ class Component(__base__.Component):
return Image.new("RGBA", (width, height), (r, g, b, 255))
def loadPreset(self, pr, presetName=None):
- self.currentPreset = presetName
+ self.currentPreset = presetName if presetName else pr['preset']
self.page.lineEdit_color1.setText('%s,%s,%s' % pr['color1'])
self.page.lineEdit_color2.setText('%s,%s,%s' % pr['color2'])
@@ -85,6 +85,7 @@ class Component(__base__.Component):
def savePreset(self):
return {
+ 'preset': self.currentPreset,
'color1': self.color1,
'color2': self.color2,
}