From 2bc64cf5ff59d6cb8464ff4df6afbf31b030a55c Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 20 May 2021 17:57:22 -0300 Subject: [PATCH] Add PalettePicks::invert() member function --- src/app/commands/cmd_select_palette.cpp | 12 ++++-------- src/doc/palette_picks.h | 7 ++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/commands/cmd_select_palette.cpp b/src/app/commands/cmd_select_palette.cpp index a5177616b..ce48ce31d 100644 --- a/src/app/commands/cmd_select_palette.cpp +++ b/src/app/commands/cmd_select_palette.cpp @@ -197,10 +197,8 @@ void SelectPaletteColorsCommand::onExecute(Context* context) } } - if (m_modifier == Modifier::UnusedColors) { - for (int i=0; isetSelectedColors(usedEntries); } else if (m_modifier == Modifier::UsedTiles || @@ -217,10 +215,8 @@ void SelectPaletteColorsCommand::onExecute(Context* context) } } - if (m_modifier == Modifier::UnusedTiles) { - for (int i=0; isetSelectedTiles(usedTiles); } } diff --git a/src/doc/palette_picks.h b/src/doc/palette_picks.h index 8bd2bc343..26cb29c2c 100644 --- a/src/doc/palette_picks.h +++ b/src/doc/palette_picks.h @@ -1,5 +1,5 @@ // Aseprite Document Library -// Copyright (c) 2019 Igara Studio S.A. +// Copyright (c) 2019-2021 Igara Studio S.A. // Copyright (c) 2001-2017 David Capello // // This file is released under the terms of the MIT license. @@ -80,6 +80,11 @@ namespace doc { return result; } + void invert() { + for (int i=0; i