From 169b664837eefc8701dbc3a5ef6165e3c2774e60 Mon Sep 17 00:00:00 2001 From: YohananDiamond Date: Sat, 3 Jun 2023 16:54:52 -0300 Subject: [PATCH] please work --- src/gui/dataList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/dataList.cpp b/src/gui/dataList.cpp index 57dafb25..2ccbca94 100644 --- a/src/gui/dataList.cpp +++ b/src/gui/dataList.cpp @@ -287,7 +287,9 @@ void FurnaceGUI::insListItem(int i, int dir, int asset) { } else { ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]); } - if (ImGui::Selectable(name.c_str(),(i==-1)?(curIns<0 || curIns>=e->song.insLen):(curIns==i))) { + bool insReleased=ImGui::Selectable(name.c_str(),(i==-1)?(curIns<0 || curIns>=e->song.insLen):(curIns==i)); + bool insPressed=ImGui::IsItemActivated(); + if (insReleased || (!insListDir && insPressed)) { curIns=i; wavePreviewInit=true; updateFMPreview=true;