From edb86929f5faa04fae240b82feae9cfefe42f0c0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 17 Mar 2015 04:02:59 +0100 Subject: [PATCH] amend 6aa6c2d, queue redraw for custom-LED change --- gtk2_ardour/ardour_button.cc | 12 ++++++++++++ gtk2_ardour/ardour_button.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_button.cc b/gtk2_ardour/ardour_button.cc index 921828c5bb..634fc4095f 100644 --- a/gtk2_ardour/ardour_button.cc +++ b/gtk2_ardour/ardour_button.cc @@ -1194,3 +1194,15 @@ ArdourButton::add_elements (Element e) _elements = (ArdourButton::Element) (_elements | e); CairoWidget::set_dirty (); } + +void +ArdourButton::set_custom_led_color (uint32_t c, bool useit) +{ + if (led_custom_color == c && use_custom_led_color == useit) { + return; + } + + led_custom_color = c; + use_custom_led_color = useit; + CairoWidget::set_dirty (); +} diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h index b1e2bb82ea..2bfb3c6f01 100644 --- a/gtk2_ardour/ardour_button.h +++ b/gtk2_ardour/ardour_button.h @@ -65,7 +65,7 @@ class ArdourButton : public CairoWidget , public Gtkmm2ext::Activatable void set_active_state (Gtkmm2ext::ActiveState); void set_visual_state (Gtkmm2ext::VisualState); - void set_custom_led_color (uint32_t c, bool useit = true) { led_custom_color = c; use_custom_led_color = useit; } + void set_custom_led_color (const uint32_t c, const bool useit = true); void set_act_on_release (bool onRelease) { _act_on_release = onRelease; }