X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.cpp;h=ab458f26bf36e981d49a1992826dbddb41e3d6e1;hp=8f5494acea39b4e0c449c9e2976e3ac589b0aaf1;hb=489953884c0d7692fa20748314751e114ae54cf2;hpb=3082ee9327af17da58c25122ac68b828676ca61e diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 8f5494ac..ab458f26 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_;