From 128fc596cb4a052036447f404063f73289eb1180 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 11 Apr 2022 04:07:01 -0500 Subject: [PATCH] GUI: wait what? --- src/gui/fileDialog.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/fileDialog.cpp b/src/gui/fileDialog.cpp index c66a27e66..7bfafb4a3 100644 --- a/src/gui/fileDialog.cpp +++ b/src/gui/fileDialog.cpp @@ -8,7 +8,7 @@ bool FurnaceGUIFileDialog::openLoad(String header, std::vector filter, c if (opened) return false; saving=false; curPath=path; - logD("opening load file dialog with curPath %s",curPath); + logD("opening load file dialog with curPath %s",curPath.c_str()); if (sysDialog) { dialogO=new pfd::open_file(header,path,filter); } else { @@ -23,7 +23,7 @@ bool FurnaceGUIFileDialog::openSave(String header, std::vector filter, c if (opened) return false; saving=true; curPath=path; - logD("opening save file dialog with curPath %s",curPath); + logD("opening save file dialog with curPath %s",curPath.c_str()); if (sysDialog) { dialogS=new pfd::save_file(header,path,filter); } else { @@ -97,15 +97,14 @@ bool FurnaceGUIFileDialog::render(const ImVec2& min, const ImVec2& max) { String FurnaceGUIFileDialog::getPath() { if (sysDialog) { - if (curPath.size()>0) { + if (curPath.size()>1) { if (curPath[curPath.size()-1]==DIR_SEPARATOR) { curPath=curPath.substr(0,curPath.size()-1); } } - logD("curPath: %s",curPath); + logD("curPath: %s",curPath.c_str()); return curPath; } else { - logD("curPath: %s",ImGuiFileDialog::Instance()->GetCurrentPath()); return ImGuiFileDialog::Instance()->GetCurrentPath(); } }