Hi all,
I've been using Kdenlive more and more, and ran into bug 407849. With
the bug, editing titles behaves as if the text alignment is the
opposite of what it is set to.
I believe I've come up with a patch for the issue, but I did not see
instructions on how to submit the patch for review. If somebody could
point me in the right direction or take a look at the attached diff,
that would be great.
Thanks,
Eric
diff --git a/src/titler/graphicsscenerectmove.cpp b/src/titler/graphicsscenerectmove.cpp
index f69fbe6c0..7e835b94a 100644
--- a/src/titler/graphicsscenerectmove.cpp
+++ b/src/titler/graphicsscenerectmove.cpp
@@ -360,9 +360,15 @@ void MyTextItem::updateGeometry()
setAlignment(m_alignment);
QPointF topRight = boundingRect().topRight();
- if ((m_alignment & static_cast<int>((Qt::AlignRight) != 0)) != 0) {
+ // if the text is right-aligned, then shift the container leftwards by the
+ // same amount it grew to maintain right-alignment
+ if (m_alignment & Qt::AlignRight) {
setPos(pos() + (topRightPrev - topRight));
}
+ // likewise, shift it halfway if we're center-aligned
+ else if (m_alignment & Qt::AlignHCenter) {
+ setPos(pos() + (topRightPrev - topRight) / 2);
+ }
}
QRectF MyTextItem::baseBoundingRect() const