mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Remove unnecessary if-condition from Selection_deselect()
This commit is contained in:
parent
7b4609d2d1
commit
5dd09187b3
@ -60,19 +60,17 @@ int Selection_gc(lua_State* L)
|
||||
int Selection_deselect(lua_State* L)
|
||||
{
|
||||
auto obj = get_obj<SelectionObject>(L, 1);
|
||||
if (obj) {
|
||||
if (obj->sprite) {
|
||||
Doc* doc = static_cast<Doc*>(obj->sprite->document());
|
||||
ASSERT(doc);
|
||||
if (obj->sprite) {
|
||||
Doc* doc = static_cast<Doc*>(obj->sprite->document());
|
||||
ASSERT(doc);
|
||||
|
||||
Tx tx;
|
||||
tx(new cmd::DeselectMask(doc));
|
||||
tx.commit();
|
||||
}
|
||||
else {
|
||||
ASSERT(obj->mask);
|
||||
obj->mask->clear();
|
||||
}
|
||||
Tx tx;
|
||||
tx(new cmd::DeselectMask(doc));
|
||||
tx.commit();
|
||||
}
|
||||
else {
|
||||
ASSERT(obj->mask);
|
||||
obj->mask->clear();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user