Skip to content

Commit a5cafcc

Browse files
committed
fix: reorder key detection in color row
so that pressing backspace (delete) gets used by the textinput, if necessary and not by the window
1 parent 4e5d913 commit a5cafcc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/scenes/settings_menu/color_setting_row.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,19 @@ bool detail::ColorPickerScene::handle_event(
114114
const SDL_Event& event
115115
) {
116116

117+
const auto result = m_color_picker.handle_event(input_manager, event);
118+
if (result) {
119+
return result;
120+
}
121+
117122
const auto navigation_event = input_manager->get_navigation_event(event);
118123

124+
119125
if (navigation_event == input::NavigationEvent::BACK) {
120126
m_should_exit = true;
121127
return true;
122128
}
123129

124-
const auto result = m_color_picker.handle_event(input_manager, event);
125-
if (result) {
126-
return result;
127-
}
128130

129131
// swallow all events
130132
return true;

0 commit comments

Comments
 (0)