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.
This commit is contained in:
Guillaume Jacquemin 2021-06-20 14:10:09 +02:00
parent 5dc7fbc06c
commit 6842b3d3f3
1 changed files with 4 additions and 1 deletions

View File

@ -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);