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

View file

@ -225,7 +225,10 @@ auto SaveTool::drawBackupListPopup() -> ImGuiID {
ImGui::EndTable(); 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)) ImGuiTableFlags_BordersOuter|ImGuiTableFlags_RowBg))
{ {
ImGui::TableSetupScrollFreeze(0, 1); ImGui::TableSetupScrollFreeze(0, 1);