summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-29 12:21:27 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-29 12:21:27 -0700
commit64aace63f0a8478be6538e87fecd574f8cc29e86 (patch)
treee66b6555cc49d92cac83888145ce7b45e9f709b0 /qt-ui/profile/profilewidget2.cpp
parent487ddce3531f6b738affc84edf066bd0ea4a16bb (diff)
downloadsubsurface-64aace63f0a8478be6538e87fecd574f8cc29e86.tar.gz
Don't connect to the MainWindow
We really shouldn't need to connect to the MainWindow in order to get the right scale for the fonts when printing. While printing likely will remain a desktop only function, this is just bad design. And making calls like this from the paint() function is a bad plan, anyway. So instead we make sure that every DiveTextItem knows what the printScale was when it was created (or actually, when the text was first set as they frequently get created before we have a scene which we use to get to the profile), and gets updated whenever that scale changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 76fcd48e0..400401655 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1465,6 +1465,7 @@ void ProfileWidget2::setPrintMode(bool mode, bool grayscale)
void ProfileWidget2::setFontPrintScale(double scale)
{
fontPrintScale = scale;
+ emit fontPrintScaleChanged(scale);
}
double ProfileWidget2::getFontPrintScale()