From 7b5167880fdf07886b225e221426c3cf545e239e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 16 Aug 2025 16:35:39 -0500 Subject: [PATCH] Revert "fix sample list right-click only working on name" This reverts commit 43b369495b909ccb0de40fce4e75f6fa89ba7ffc. --- src/gui/dataList.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gui/dataList.cpp b/src/gui/dataList.cpp index f97c91d34..400fd6e6c 100644 --- a/src/gui/dataList.cpp +++ b/src/gui/dataList.cpp @@ -286,6 +286,25 @@ void FurnaceGUI::sampleListItem(int i, int dir, int asset) { nextWindow=GUI_WINDOW_SAMPLE_EDIT; } } + if (sampleListDir || (settings.unifiedDataView && insListDir)) { + DIR_DRAG_SOURCE(dir,asset,"FUR_SDIR"); + DIR_DRAG_TARGET(dir,asset,e->song.sampleDir,"FUR_SDIR"); + } else { + SIMPLE_DRAG_SOURCE("FUR_SAMPLE",sampleToMove); + SIMPLE_DRAG_TARGET("FUR_SAMPLE",sampleToMove,curSample,e->swapSamples,e->moveSampleUp,e->moveSampleDown); + } + ImGui::SameLine(); + ImGui::TextNoHashHide("%s",sample->name.c_str()); + if (memWarning) { + ImGui::SameLine(); + ImGui::Text(ICON_FA_EXCLAMATION_TRIANGLE); + if (ImGui::IsItemHovered() && !mobileUI) { + ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]); + ImGui::SetTooltip(_("out of memory for this sample!")); + ImGui::PopStyleColor(); + } + ImGui::PopStyleColor(); + } if (ImGui::BeginPopupContextItem("SampleRightMenu")) { curSample=i; samplePos=0; @@ -316,25 +335,6 @@ void FurnaceGUI::sampleListItem(int i, int dir, int asset) { ImGui::PopStyleColor(); ImGui::EndPopup(); } - if (sampleListDir || (settings.unifiedDataView && insListDir)) { - DIR_DRAG_SOURCE(dir,asset,"FUR_SDIR"); - DIR_DRAG_TARGET(dir,asset,e->song.sampleDir,"FUR_SDIR"); - } else { - SIMPLE_DRAG_SOURCE("FUR_SAMPLE",sampleToMove); - SIMPLE_DRAG_TARGET("FUR_SAMPLE",sampleToMove,curSample,e->swapSamples,e->moveSampleUp,e->moveSampleDown); - } - ImGui::SameLine(); - ImGui::TextNoHashHide("%s",sample->name.c_str()); - if (memWarning) { - ImGui::SameLine(); - ImGui::Text(ICON_FA_EXCLAMATION_TRIANGLE); - if (ImGui::IsItemHovered() && !mobileUI) { - ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]); - ImGui::SetTooltip(_("out of memory for this sample!")); - ImGui::PopStyleColor(); - } - ImGui::PopStyleColor(); - } if (wantScrollListSample && curSample==i) ImGui::SetScrollHereY(); ImGui::PopID(); }