parent
87e42e4f66
commit
75bbd8259a
1 changed files with 11 additions and 18 deletions
|
@ -1121,22 +1121,17 @@ SceneTreeEditor::~SceneTreeEditor() {
|
||||||
|
|
||||||
void SceneTreeDialog::_notification(int p_what) {
|
void SceneTreeDialog::_notification(int p_what) {
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
switch (p_what) {
|
||||||
connect("confirmed", this, "_select");
|
case NOTIFICATION_ENTER_TREE: {
|
||||||
}
|
connect("confirmed", this, "_select");
|
||||||
|
} break;
|
||||||
if (p_what == NOTIFICATION_EXIT_TREE) {
|
case NOTIFICATION_EXIT_TREE: {
|
||||||
disconnect("confirmed", this, "_select");
|
disconnect("confirmed", this, "_select");
|
||||||
}
|
} break;
|
||||||
if (p_what == NOTIFICATION_DRAW) {
|
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||||
|
if (is_visible_in_tree())
|
||||||
RID ci = get_canvas_item();
|
tree->update_tree();
|
||||||
get_stylebox("panel", "PopupMenu")->draw(ci, Rect2(Point2(), get_size()));
|
} break;
|
||||||
}
|
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_VISIBILITY_CHANGED && is_visible_in_tree()) {
|
|
||||||
|
|
||||||
tree->update_tree();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1165,8 +1160,6 @@ SceneTreeDialog::SceneTreeDialog() {
|
||||||
|
|
||||||
tree = memnew(SceneTreeEditor(false, false, true));
|
tree = memnew(SceneTreeEditor(false, false, true));
|
||||||
add_child(tree);
|
add_child(tree);
|
||||||
//set_child_rect(tree);
|
|
||||||
|
|
||||||
tree->get_scene_tree()->connect("item_activated", this, "_select");
|
tree->get_scene_tree()->connect("item_activated", this, "_select");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue