SaveTool: add a {Push,Pop}ID pair.

There were issues with the buttons in the backup list.
This commit is contained in:
Guillaume Jacquemin 2021-06-20 14:11:18 +02:00
parent 6842b3d3f3
commit 3172939b53
1 changed files with 2 additions and 0 deletions

View File

@ -273,6 +273,7 @@ auto SaveTool::drawBackupListPopup() -> ImGuiID {
ImGui::TextUnformatted(_profileManager->backups().at(i).type == ProfileType::Demo ? "Demo" : "Full");
ImGui::TableSetColumnIndex(3);
ImGui::PushID(i);
if(ImGui::SmallButton(ICON_FA_UNDO)) {
backup_index = i;
ImGui::OpenPopup(restore_backup_popup_id);
@ -282,6 +283,7 @@ auto SaveTool::drawBackupListPopup() -> ImGuiID {
backup_index = i;
ImGui::OpenPopup(delete_backup_popup_id);
}
ImGui::PopID();
}
ImGui::EndTable();
}