[studio,nostalgia/gfx/studio/tilesheet] Fix copy/cut/paste enablement when there is no selection
All checks were successful
Build / build (push) Successful in 2m2s

This commit is contained in:
2025-06-21 00:18:34 -05:00
parent 58e0ecb469
commit 5f2397903a
5 changed files with 22 additions and 6 deletions

View File

@@ -72,8 +72,10 @@ bool BaseEditor::exportable() const noexcept {
}
void BaseEditor::setCutEnabled(bool v) {
m_cutEnabled = v;
cutEnabledChanged.emit(v);
if (m_cutEnabled != v) {
m_cutEnabled = v;
cutEnabledChanged.emit(v);
}
}
bool BaseEditor::cutEnabled() const noexcept {
@@ -81,8 +83,10 @@ bool BaseEditor::cutEnabled() const noexcept {
}
void BaseEditor::setCopyEnabled(bool v) {
m_copyEnabled = v;
copyEnabledChanged.emit(v);
if (m_copyEnabled != v) {
m_copyEnabled = v;
copyEnabledChanged.emit(v);
}
}
bool BaseEditor::copyEnabled() const noexcept {
@@ -90,8 +94,10 @@ bool BaseEditor::copyEnabled() const noexcept {
}
void BaseEditor::setPasteEnabled(bool v) {
m_pasteEnabled = v;
pasteEnabledChanged.emit(v);
if (m_pasteEnabled != v) {
m_pasteEnabled = v;
pasteEnabledChanged.emit(v);
}
}
bool BaseEditor::pasteEnabled() const noexcept {