X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fview.cpp;h=97a6bcf74b5bc78d7068c9d9b1615f203208b418;hb=59ec98e2b704d918c236e82f41536ce833890fb0;hp=8f5494acea39b4e0c449c9e2976e3ac589b0aaf1;hpb=8ad61f4071a69445a6917d214b6592878447ddb1;p=pulseview.git diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 8f5494a..97a6bcf 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -570,31 +570,15 @@ void View::enable_show_analog_minor_grid(bool state) void View::enable_coloured_bg(bool state) { - const vector> items( - list_by_type()); - - for (shared_ptr i : items) { - // Can't cast to Trace because it's abstract, so we need to - // check for any derived classes individually - - shared_ptr a = dynamic_pointer_cast(i); - if (a) - a->set_coloured_bg(state); - - shared_ptr l = dynamic_pointer_cast(i); - if (l) - l->set_coloured_bg(state); - -#ifdef ENABLE_DECODE - shared_ptr d = dynamic_pointer_cast(i); - if (d) - d->set_coloured_bg(state); -#endif - } - + coloured_bg_ = state; viewport_->update(); } +bool View::coloured_bg() const +{ + return coloured_bg_; +} + bool View::cursors_shown() const { return show_cursors_; @@ -671,12 +655,6 @@ void View::restack_all_trace_tree_items() for (auto &o : sorted_owners) o->restack_items(); - // Re-assign background colors - bool next_bgcolour_state = false; - - for (auto &o : sorted_owners) - next_bgcolour_state = o->reassign_bgcolour_states(next_bgcolour_state); - // Animate the items to their destination for (const auto &i : items) i->animate_to_layout_v_offset();