From 8c09273b13a10399e7f7d18dd446c2d13813e239 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Thu, 7 Apr 2016 22:01:31 +0200 Subject: [PATCH] View: Restore the original signals_changed() positioning code --- pv/view/view.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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(); -- 2.30.2