From 78a86e3d08e0efe6a006e2d29ca1a7a9b1cd8fba Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 5 Oct 2025 01:59:32 -0500 Subject: [PATCH] file picker: what? it's stil broken?! --- src/gui/newFilePicker.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/newFilePicker.cpp b/src/gui/newFilePicker.cpp index 822a269b7..d272e71a5 100644 --- a/src/gui/newFilePicker.cpp +++ b/src/gui/newFilePicker.cpp @@ -1106,14 +1106,14 @@ void FurnaceFilePicker::drawFileList(ImVec2& tableSize, bool& acknowledged) { lastScrollY=ImGui::GetScrollY(); } else { ImGui::SetScrollY(lastScrollY); + if (ImGui::GetScrollMaxY()>=lastScrollY) { + enforceScrollY--; + } } ImGui::EndTable(); entryLock.unlock(); } - if (enforceScrollY>0 && haveFiles) { - enforceScrollY--; - } } } @@ -1784,8 +1784,8 @@ bool FurnaceFilePicker::draw(ImGuiWindowFlags winFlags) { if (readDirectory(newDir) || isSearch || (isSearchPrev!=isSearch)) { // scroll to top lastScrollY=0.0f; - enforceScrollY=2; } + enforceScrollY=2; } return (curStatus!=FP_STATUS_WAITING); } @@ -1823,8 +1823,8 @@ bool FurnaceFilePicker::open(String name, String pa, String hint, int flags, con isSearch=false; if (readDirectory(pa)) { lastScrollY=0.0f; - enforceScrollY=2; } + enforceScrollY=2; windowName=name; } hint=entryNameHint;