]> git.siccegge.de Git - frida/frida.git/commitdiff
[BasicBlockWidget] Adjust inner widget size before drawing
authorChristoph Egger <Christoph.Egger@fau.de>
Thu, 12 Mar 2015 15:46:00 +0000 (16:46 +0100)
committerChristoph Egger <Christoph.Egger@fau.de>
Thu, 12 Mar 2015 15:48:32 +0000 (16:48 +0100)
Adjust size of the innner QGraphicsTextItem before getting it's size for
drawing the outer parts. That way the BasicBlockWidget always has the
correct size matching it's content

Closes: T20
src/gui/widgets/BasicBlockWidget.cxx

index a2312c20140e596c7b86c350275433daa20de55a..4889cb43fdded1d58332f8e2d61497549b5e031e 100644 (file)
@@ -156,6 +156,7 @@ void BasicBlockWidget::addItem(uint8_t* bytes, size_t num_bytes,
 
 void BasicBlockWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem*,
                   QWidget*) {
+       _widget->adjustSize();
        width = 10 + _widget->boundingRect().width();
        height = 25 + _widget->boundingRect().height();
        if (width < 250) width = 250;