[nostalgia/core/studio/tilesheeteditor] Fix select all not to go beyond end
This commit is contained in:
parent
6b0ce40c02
commit
74e518fee0
@ -188,7 +188,7 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept {
|
|||||||
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl)) {
|
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl)) {
|
||||||
if (ImGui::IsKeyPressed(ImGuiKey_A)) {
|
if (ImGui::IsKeyPressed(ImGuiKey_A)) {
|
||||||
auto const&img = m_model.activeSubSheet();
|
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)) {
|
} else if (ImGui::IsKeyPressed(ImGuiKey_G)) {
|
||||||
m_model.clearSelection();
|
m_model.clearSelection();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user