DecodeTrace: Fix some UI bugs
authorSoeren Apel <soeren@apelpie.net>
Tue, 31 Dec 2019 15:36:12 +0000 (16:36 +0100)
committerSoeren Apel <soeren@apelpie.net>
Wed, 1 Jan 2020 14:05:05 +0000 (15:05 +0100)
pv/views/trace/decodetrace.cpp

index 0f625b1a3b4bd62ba37f6b309056d81fa9457773..07f88489fd18a9adeb9045bbaca72055faad881d 100644 (file)
@@ -275,6 +275,8 @@ void DecodeTrace::paint_fore(QPainter &p, ViewItemPaintParams &pp)
 {
        unsigned int y = get_visual_y();
 
+       update_expanded_rows();
+
        for (const DecodeTraceRow& r : rows_) {
                if (!r.currently_visible)
                        continue;
@@ -1364,9 +1366,11 @@ void DecodeTrace::set_row_collapsed(DecodeTraceRow* r)
 void DecodeTrace::update_expanded_rows()
 {
        for (DecodeTraceRow& r : rows_) {
-
                r.container->move(2 * ArrowSize,
                        get_row_y(&r) + default_row_height_);
+
+               r.container->resize(owner_->view()->viewport()->width() - r.container->pos().x(),
+                       r.height - 2 * default_row_height_);
        }
 }