aboutsummaryrefslogtreecommitdiff
path: root/components/text.py
diff options
context:
space:
mode:
authortassaron2017-06-08 16:50:48 -0400
committertassaron2017-06-08 16:50:48 -0400
commitbb1e54b31eb6157ef041764cfccd60484a0e02d8 (patch)
treecbd2aed7edd1b6c429437929c03ec8cdb9c67e33 /components/text.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/text.py')
-rw-r--r--components/text.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/text.py b/components/text.py
index 1725a41..68cffca 100644
--- a/components/text.py
+++ b/components/text.py
@@ -79,7 +79,7 @@ class Component(__base__.Component):
return x, self.yPosition
def loadPreset(self, pr, presetName=None):
- self.currentPreset = presetName
+ self.currentPreset = presetName if presetName else pr['preset']
self.page.lineEdit_title.setText(pr['title'])
font = QFont()
font.fromString(pr['titleFont'])
@@ -95,6 +95,7 @@ class Component(__base__.Component):
def savePreset(self):
return {
+ 'preset': self.currentPreset,
'title': self.title,
'titleFont': self.titleFont.toString(),
'alignment': self.alignment,