mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 13:21:34 +00:00
Avoid creating a cmd::SetPalette() when the palette size isn't modified
This commit is contained in:
parent
7a63476a98
commit
26d09efc0d
@ -60,6 +60,9 @@ void PaletteSizeCommand::onExecute(Context* context)
|
||||
window.openWindowInForeground();
|
||||
if (window.getKiller() == window.ok()) {
|
||||
int ncolors = window.colors()->getTextInt();
|
||||
if (ncolors == palette.size())
|
||||
return;
|
||||
|
||||
palette.resize(MID(1, ncolors, INT_MAX));
|
||||
|
||||
Transaction transaction(context, "Palette Size", ModifyDocument);
|
||||
|
Loading…
x
Reference in New Issue
Block a user