From: Soeren Apel Date: Thu, 7 Apr 2016 20:01:31 +0000 (+0200) Subject: View: Restore the original signals_changed() positioning code X-Git-Tag: pulseview-0.4.0~320 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=8c09273b13a10399e7f7d18dd446c2d13813e239;ds=sidebyside View: Restore the original signals_changed() positioning code --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 758e7118..5649bdc8 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -1090,15 +1090,19 @@ void View::signals_changed() // Add and position the pending top levels items for (auto item : new_top_level_items) { + add_child_item(item); + // Position the item after the last item or at the top if there is none int offset = v_extents().second; + const pair extents = item->v_extents(); + + if (item->enabled()) + offset += -extents.first; - add_child_item(item); item->force_to_v_offset(offset); - const pair extents = item->v_extents(); if (item->enabled()) - offset += (extents.second - extents.first); + offset += extents.second; } update_layout();