mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-20 15:24:14 +02:00
Merge pull request #747 from ispyisail/fix/parttext-real-font-size-desync
Fix real_font_size_ desyncing from the actual font in PartText
This commit is contained in:
@@ -440,6 +440,14 @@ void PartText::setFont(const QFont &font) {
|
||||
// at a different spot after save/reopen (the position recomputes from
|
||||
// the saved font on load). See #158.
|
||||
adjustItemPosition();
|
||||
// Keep real_font_size_ in sync with the actual font. It's the base
|
||||
// size startUserTransformation()/handleUserTransformation() scale
|
||||
// from when the user drags a resize handle, and flip() also reads it
|
||||
// to reposition the item. Left stale here, either one computes from
|
||||
// whatever size the item had when it was first created, ignoring any
|
||||
// size set since (toolbar, property editor, or loaded from XML) -
|
||||
// found investigating #158.
|
||||
real_font_size_ = font.pointSize();
|
||||
emit fontChanged(font);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user