From 2a93672c70aa4a0aefdb5b4f22d93479031ee6f3 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 31 Aug 2022 11:36:39 -0300 Subject: [PATCH] [lua] Range:clear() now clears the selection of slices --- src/app/script/range_class.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/script/range_class.cpp b/src/app/script/range_class.cpp index e55998157..1611a2c11 100644 --- a/src/app/script/range_class.cpp +++ b/src/app/script/range_class.cpp @@ -173,6 +173,11 @@ int Range_clear(lua_State* L) doc::PalettePicks picks; ctx->setSelectedColors(picks); + // Empty selected slices in the current editor + // TODO add a new function to Context class for this + if (current_editor) + current_editor->clearSlicesSelection(); + obj->updateFromSite(ctx->activeSite()); return 0; }