From: Soeren Apel Date: Thu, 7 Apr 2016 20:02:04 +0000 (+0200) Subject: View: Handle pre-existing trace groups correctly X-Git-Tag: pulseview-0.4.0~319 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7d5565237c8dae52b5a15d39f28b2964b6f79a5f;p=pulseview.git View: Handle pre-existing trace groups correctly --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 5649bdc8..b877da1e 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -1038,13 +1038,15 @@ void View::signals_changed() offset += extents.second; } - // Assign proper vertical offsets to each channel in the group - new_trace_group->restack_items(); - - // If this is a new group, enqueue it in the new top level - // items list - if (!new_traces_in_group.empty() && new_trace_group) - new_top_level_items.push_back(new_trace_group); + if (new_trace_group) { + // Assign proper vertical offsets to each channel in the group + new_trace_group->restack_items(); + + // If this is a new group, enqueue it in the new top level + // items list + if (!new_traces_in_group.empty()) + new_top_level_items.push_back(new_trace_group); + } } // Enqueue the remaining logic channels in a group