From 6842b3d3f319353ac054bdbc2401357a5b1cf042 Mon Sep 17 00:00:00 2001 From: William JCM Date: Sun, 20 Jun 2021 14:10:09 +0200 Subject: [PATCH] SaveTool: add a fallback if there are no profile backups. The table formatting was messed up when there were no backups, so I'm working around it by... not displaying the table. --- src/SaveTool/SaveTool_ProfileManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SaveTool/SaveTool_ProfileManager.cpp b/src/SaveTool/SaveTool_ProfileManager.cpp index b9e09cc..d7291b4 100644 --- a/src/SaveTool/SaveTool_ProfileManager.cpp +++ b/src/SaveTool/SaveTool_ProfileManager.cpp @@ -225,7 +225,10 @@ auto SaveTool::drawBackupListPopup() -> ImGuiID { ImGui::EndTable(); } - if(ImGui::BeginTable("##Backups", 4, + if(_profileManager->backups().empty()) { + ImGui::TextDisabled("No backups were found."); + } + else if(ImGui::BeginTable("##Backups", 4, ImGuiTableFlags_BordersOuter|ImGuiTableFlags_RowBg)) { ImGui::TableSetupScrollFreeze(0, 1);