diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index 7d4fbb5cb..680683785 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -1202,10 +1202,10 @@ void VLayoutPiece::CreateLabelStrings(QGraphicsItem *parent, const QVector(dW)); } - if ((tl.m_eAlign & Qt::AlignLeft) > 0) + + qreal dX = 0; + if (tl.m_eAlign == 0 || (tl.m_eAlign & Qt::AlignLeft) > 0) { dX = 0; } @@ -1245,7 +1247,7 @@ void VLayoutPiece::CreateLabelStrings(QGraphicsItem *parent, const QVector 0) { #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) dX = dW - fm.horizontalAdvance(qsText);