[qet] qet/qet: [5370] Fix : element text alignment work also when font size change. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 5370
Author: blacksun
Date: 2018-05-18 20:28:04 +0200 (Fri, 18 May 2018)
Log Message:
-----------
Fix : element text alignment work also when font size change.
Modified Paths:
--------------
trunk/sources/editor/graphicspart/partdynamictextfield.cpp
trunk/sources/qetgraphicsitem/diagramtextitem.cpp
Modified: trunk/sources/editor/graphicspart/partdynamictextfield.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partdynamictextfield.cpp 2018-05-16 16:36:09 UTC (rev 5369)
+++ trunk/sources/editor/graphicspart/partdynamictextfield.cpp 2018-05-18 18:28:04 UTC (rev 5370)
@@ -351,8 +351,11 @@
* @brief PartDynamicTextField::setFontSize
* @param s
*/
-void PartDynamicTextField::setFontSize(int s) {
+void PartDynamicTextField::setFontSize(int s)
+{
+ prepareAlignment();
setFont(QETApp::diagramTextsFont(s));
+ finishAlignment();
emit fontSizeChanged(s);
}
Modified: trunk/sources/qetgraphicsitem/diagramtextitem.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/diagramtextitem.cpp 2018-05-16 16:36:09 UTC (rev 5369)
+++ trunk/sources/qetgraphicsitem/diagramtextitem.cpp 2018-05-18 18:28:04 UTC (rev 5370)
@@ -152,7 +152,9 @@
void DiagramTextItem::setFontSize(int s)
{
+ prepareAlignment();
setFont(QETApp::diagramTextsFont(s));
+ finishAlignment();
emit fontSizeChanged(s);
}