]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.cpp
Trace: Removed coloured_bg state
[pulseview.git] / pv / view / view.cpp
index 0e3fa98fffc4b91b8f94af291c179ed20314724c..ab458f26bf36e981d49a1992826dbddb41e3d6e1 100644 (file)
@@ -561,33 +561,24 @@ void View::enable_show_sampling_points(bool state)
        viewport_->update();
 }
 
-void View::enable_coloured_bg(bool state)
+void View::enable_show_analog_minor_grid(bool state)
 {
-       const vector<shared_ptr<TraceTreeItem>> items(
-               list_by_type<TraceTreeItem>());
-
-       for (shared_ptr<TraceTreeItem> i : items) {
-               // Can't cast to Trace because it's abstract, so we need to
-               // check for any derived classes individually
-
-               shared_ptr<AnalogSignal> a = dynamic_pointer_cast<AnalogSignal>(i);
-               if (a)
-                       a->set_coloured_bg(state);
-
-               shared_ptr<LogicSignal> l = dynamic_pointer_cast<LogicSignal>(i);
-               if (l)
-                       l->set_coloured_bg(state);
+       (void)state;
 
-#ifdef ENABLE_DECODE
-               shared_ptr<DecodeTrace> d = dynamic_pointer_cast<DecodeTrace>(i);
-               if (d)
-                       d->set_coloured_bg(state);
-#endif
-       }
+       viewport_->update();
+}
 
+void View::enable_coloured_bg(bool state)
+{
+       coloured_bg_ = state;
        viewport_->update();
 }
 
+bool View::coloured_bg() const
+{
+       return coloured_bg_;
+}
+
 bool View::cursors_shown() const
 {
        return show_cursors_;