From 9a06deb0e602d396c17b1368513c3a070fb72fa9 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 16 Apr 2020 21:26:28 -0300 Subject: [PATCH] [lua] Clear selected colors with app.range:clear() too --- src/app/script/range_class.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/script/range_class.cpp b/src/app/script/range_class.cpp index 3d719ff6b..79b6b48d4 100644 --- a/src/app/script/range_class.cpp +++ b/src/app/script/range_class.cpp @@ -21,7 +21,6 @@ #include "doc/object_ids.h" #include "doc/sprite.h" -#include #include #include @@ -156,8 +155,12 @@ int Range_clear(lua_State* L) // Set an empty range DocRange range; ctx->setRange(range); - obj->updateFromSite(ctx->activeSite()); + // Set empty palette picks + doc::PalettePicks picks; + ctx->setSelectedColors(picks); + + obj->updateFromSite(ctx->activeSite()); return 0; }