From: Soeren Apel Date: Thu, 7 Apr 2016 20:01:31 +0000 (+0200) Subject: View: Restore the original signals_changed() positioning code X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=8c09273b13a10399e7f7d18dd446c2d13813e239;hp=bc72e51ffa24d47a382b118bfe63df154dac9cf1;p=pulseview.git View: Restore the original signals_changed() positioning code --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 758e711..5649bdc 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();