Merge pull request #20466 from TigerCaldwell/layer_toggle_fix
Layer editor shouldn't close each time one is toggled (#20399)
This commit is contained in:
commit
c47f824c3b
|
@ -726,6 +726,7 @@ void EditorPropertyLayers::_menu_pressed(int p_menu) {
|
||||||
grid->value |= (1 << p_menu);
|
grid->value |= (1 << p_menu);
|
||||||
}
|
}
|
||||||
grid->update();
|
grid->update();
|
||||||
|
layers->set_item_checked(layers->get_item_index(p_menu), grid->value & (1 << p_menu));
|
||||||
_grid_changed(grid->value);
|
_grid_changed(grid->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -751,6 +752,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
|
||||||
set_bottom_editor(hb);
|
set_bottom_editor(hb);
|
||||||
layers = memnew(PopupMenu);
|
layers = memnew(PopupMenu);
|
||||||
add_child(layers);
|
add_child(layers);
|
||||||
|
layers->set_hide_on_checkable_item_selection(false);
|
||||||
layers->connect("id_pressed", this, "_menu_pressed");
|
layers->connect("id_pressed", this, "_menu_pressed");
|
||||||
}
|
}
|
||||||
///////////////////// INT /////////////////////////
|
///////////////////// INT /////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue