Skip to content
Snippets Groups Projects
Commit 41f46392 authored by Marco Biasini's avatar Marco Biasini
Browse files

allow to clear selection with gfx_ent.selection=None

parent 388855aa
Branches
Tags
No related merge requests found
...@@ -241,6 +241,11 @@ RenderOptionsPtr ent_ltrace_opts(Entity* ent) ...@@ -241,6 +241,11 @@ RenderOptionsPtr ent_ltrace_opts(Entity* ent)
void set_selection(Entity* ent, object sel) void set_selection(Entity* ent, object sel)
{ {
object none;
if (sel==none) {
ent->SetSelection(ent->GetView().CreateEmptyView());
return;
}
try { try {
String sel_string=extract<String>(sel); String sel_string=extract<String>(sel);
ent->SetSelection(ent->GetView().Select(sel_string)); ent->SetSelection(ent->GetView().Select(sel_string));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment