[nostalgia/core/studio/tilesheeteditor] Fix select all not to go beyond end

This commit is contained in:
Gary Talent 2025-01-11 16:21:10 -06:00
parent 6b0ce40c02
commit 74e518fee0

View File

@ -188,7 +188,7 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept {
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl)) {
if (ImGui::IsKeyPressed(ImGuiKey_A)) {
auto const&img = m_model.activeSubSheet();
m_model.setSelection({{}, {img.columns * TileWidth, img.rows * TileHeight}});
m_model.setSelection({{}, {img.columns * TileWidth - 1, img.rows * TileHeight - 1}});
} else if (ImGui::IsKeyPressed(ImGuiKey_G)) {
m_model.clearSelection();
}