diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-06-11 18:08:13 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-06-11 18:08:13 +0200 |
commit | e28b9ef4a452c176c1baf915949397d7af878c19 (patch) | |
tree | 64e7b32fa9326af4578b758b7c9bfa92411e8ea4 /qtmips_gui/coreview | |
parent | dc68dff538394de7ff0f1e12d079aed7dd919c1b (diff) | |
download | qtmips-e28b9ef4a452c176c1baf915949397d7af878c19.tar.gz qtmips-e28b9ef4a452c176c1baf915949397d7af878c19.tar.bz2 qtmips-e28b9ef4a452c176c1baf915949397d7af878c19.zip |
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 <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui/coreview')
-rw-r--r-- | qtmips_gui/coreview/value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |