From e28b9ef4a452c176c1baf915949397d7af878c19 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 11 Jun 2019 18:08:13 +0200 Subject: coreview: correct translation of position for vertical text printing. setY does not translate top and bottom together. The result was flipped rectangle. Signed-off-by: Pavel Pisa --- qtmips_gui/coreview/value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qtmips_gui') diff --git a/qtmips_gui/coreview/value.cpp b/qtmips_gui/coreview/value.cpp index 9dbe2e0..7dd1e6a 100644 --- a/qtmips_gui/coreview/value.cpp +++ b/qtmips_gui/coreview/value.cpp @@ -82,7 +82,7 @@ void Value::paint(QPainter *painter, const QStyleOptionGraphicsItem *option __at for (unsigned i = 0; i < wid; i++) { painter->drawText(rect, Qt::AlignCenter, QString(str[i])); // TODO this is probably broken (it is offseted) - rect.setY(rect.y() + HEIGHT + 8); + rect.translate(0, HEIGHT); } } else painter->drawText(rect, Qt::AlignCenter, str); -- cgit v1.2.3