From bd1fc01ca1f002ecdb247deed7dfa55927c12c83 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 22 Dec 2019 21:35:00 -0600 Subject: [PATCH] [nostalgia/core/studio] Obsolete UpdatePixelCommands that change nothing --- src/nostalgia/core/studio/tilesheeteditor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nostalgia/core/studio/tilesheeteditor.cpp b/src/nostalgia/core/studio/tilesheeteditor.cpp index b4e86234..f91bb1ad 100644 --- a/src/nostalgia/core/studio/tilesheeteditor.cpp +++ b/src/nostalgia/core/studio/tilesheeteditor.cpp @@ -63,6 +63,7 @@ class UpdatePixelsCommand: public QUndoCommand { pu.item = pixelItem; pu.oldColorId = m_palette.indexOf(pixelItem->property("color").value().name(QColor::HexArgb)); m_pixelUpdates.insert(pu); + setObsolete(pu.oldColorId == newColorId); } virtual ~UpdatePixelsCommand() = default;