[nostalgia/gfx/studio/tilesheet] Disable paste when nothing is selected

This commit is contained in:
2025-06-22 01:00:56 -05:00
parent f5ccab5f2c
commit 9028e74af0

View File

@ -194,6 +194,7 @@ void TileSheetEditorImGui::keyStateChanged(turbine::Key const key, bool const do
void TileSheetEditorImGui::draw(studio::Context&) noexcept { void TileSheetEditorImGui::draw(studio::Context&) noexcept {
setCopyEnabled(m_model.hasSelection()); setCopyEnabled(m_model.hasSelection());
setCutEnabled(m_model.hasSelection()); setCutEnabled(m_model.hasSelection());
setPasteEnabled(m_model.hasSelection());
if (ig::mainWinHasFocus() && m_tool == TileSheetTool::Select) { if (ig::mainWinHasFocus() && m_tool == TileSheetTool::Select) {
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl) && !m_palPathFocused) { if (ImGui::IsKeyDown(ImGuiKey_ModCtrl) && !m_palPathFocused) {
if (ImGui::IsKeyPressed(ImGuiKey_A)) { if (ImGui::IsKeyPressed(ImGuiKey_A)) {