From 9e3dc09041aa5ef952033301f304a962da198f62 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Wed, 21 Nov 2018 22:20:14 -0500 Subject: Fix returning to previous LED mode when layer is toggled off. --- src/Kaleidoscope-LayerHighlighter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Kaleidoscope-LayerHighlighter.cpp b/src/Kaleidoscope-LayerHighlighter.cpp index 30d0611..3ed56cb 100644 --- a/src/Kaleidoscope-LayerHighlighter.cpp +++ b/src/Kaleidoscope-LayerHighlighter.cpp @@ -9,8 +9,10 @@ kaleidoscope::EventHandlerResult LayerHighlighter::onSetup(void) { } kaleidoscope::EventHandlerResult LayerHighlighter::afterEachCycle() { - if (!Layer.isOn(layer)) + if (!Layer.isOn(layer)) { + LEDControl.set_mode(LEDControl.get_mode_index()); return kaleidoscope::EventHandlerResult::OK; + } LEDControl.set_mode(LEDControl.get_mode_index()); -- cgit v1.2.3