From 74d5df7e3781b7fa974ed77db9fee97cf1764041 Mon Sep 17 00:00:00 2001 From: Kurt LaVacque Date: Fri, 5 Jan 2024 09:10:21 -0600 Subject: [PATCH] Made it so it returns to the same color slot after you edit the color --- Helios.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Helios.cpp b/Helios.cpp index 924f7f27..48744b30 100644 --- a/Helios.cpp +++ b/Helios.cpp @@ -439,10 +439,13 @@ void Helios::handle_state_col_select() if (check_longclick && Button::onLongClick()) { if (cur_state == STATE_COLOR_SELECT_VAL) { cur_state = STATE_COLOR_SELECT_SLOT; + // Return to the slot you were editing + menu_selection = selected_slot; } else { cur_state = (State)(cur_state + 1); + // reset the menu selection + menu_selection = 0; } - menu_selection = 0; } // get the current color RGBColor cur = Led::get(); @@ -539,6 +542,8 @@ bool Helios::handle_state_col_select_quadrant() case 0: // selected blank // add blank to set pat.colorset().set(selected_slot, RGB_OFF); + // Return to the slot you were editing + menu_selection = selected_slot; // go to slot selection - 1 because we will increment outside here cur_state = STATE_COLOR_SELECT_SLOT; return false;