aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortassaron2022-05-07 20:00:13 -0400
committertassaron2022-05-07 20:00:13 -0400
commitf8ec464747883db7783b74c1e85fdf836835edb1 (patch)
tree838ddcc06dc6d856231a6eacc2ccb1c3365cd12e
parent7ea81767fc8e7490f69b5d34aa6ea86e62098311 (diff)
fix to make the QFontComboBox update the preview
Unfortunately it's not an "undoable" ComponentAction object, it just triggers the raw PyQt Signal for now. This is a small patch until I fix it better by rewriting the Component base class, someday :P
-rw-r--r--src/components/text.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/text.py b/src/components/text.py
index e8c5a9c..3238d2a 100644
--- a/src/components/text.py
+++ b/src/components/text.py
@@ -25,14 +25,15 @@ class Component(Component):
self.page.comboBox_textAlign.addItem("Middle")
self.page.comboBox_textAlign.addItem("Right")
self.page.comboBox_textAlign.setCurrentIndex(int(self.alignment))
-
self.page.spinBox_fontSize.setValue(int(self.fontSize))
self.page.lineEdit_title.setText(self.title)
-
self.page.pushButton_center.clicked.connect(self.centerXY)
- self.page.fontComboBox_titleFont.currentFontChanged.connect(
- self.update
- )
+
+ self.page.fontComboBox_titleFont.currentFontChanged.connect(self._sendUpdateSignal)
+ # The QFontComboBox must be connected directly to the Qt Signal
+ # which triggers the preview to update.
+ # This unfortunately makes changing the font into a non-undoable action.
+ # Must be something broken in the conversion to a ComponentAction
self.trackWidgets({
'textColor': self.page.lineEdit_textColor,