[lua] Clear selected colors with app.range:clear() too

This commit is contained in:
David Capello 2020-04-16 21:26:28 -03:00
parent e149f76934
commit 9a06deb0e6

View File

@ -21,7 +21,6 @@
#include "doc/object_ids.h"
#include "doc/sprite.h"
#include <algorithm>
#include <set>
#include <vector>
@ -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;
}