summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-01-04 20:42:47 +0100
committerGitHub <noreply@github.com>2018-01-04 20:42:47 +0100
commit1b79326c0f06fec2a390a57607ef56ce8e6bd5b5 (patch)
tree1806cf99edac297b3367a5b7c5da3e7b3aa9a82c
parent67079f06961a185ea8d65972a69d1d64fc23f96a (diff)
parent1876999b3a86a91099c6c06b0ff29ae127f9767b (diff)
Merge pull request #15341 from volzhs/scene-index-error
Fix get_edited_scene_root error at starting editor
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp3
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp2
-rw-r--r--editor/property_editor.cpp1
3 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index a52c914096..d116e30cfe 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3990,6 +3990,7 @@ void CanvasItemEditor::_bind_methods() {
ClassDB::bind_method("_snap_changed", &CanvasItemEditor::_snap_changed);
ClassDB::bind_method(D_METHOD("_selection_result_pressed"), &CanvasItemEditor::_selection_result_pressed);
ClassDB::bind_method(D_METHOD("_selection_menu_hide"), &CanvasItemEditor::_selection_menu_hide);
+ ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
ADD_SIGNAL(MethodInfo("item_lock_status_changed"));
ADD_SIGNAL(MethodInfo("item_group_status_changed"));
@@ -4348,7 +4349,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
additive_selection = false;
// Update the menus checkboxes
- set_state(get_state());
+ call_deferred("set_state", get_state());
}
CanvasItemEditor *CanvasItemEditor::singleton = NULL;
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 50db80ba01..475cdf07ba 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -342,7 +342,7 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
split->add_child(property_editor);
helper = memnew(AutotileEditorHelper(this));
- property_editor->edit(helper);
+ property_editor->call_deferred("edit", helper);
//Editor
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 1dcc5a3231..89dcae0038 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -4135,6 +4135,7 @@ void PropertyEditor::_bind_methods() {
ClassDB::bind_method("_resource_preview_done", &PropertyEditor::_resource_preview_done);
ClassDB::bind_method("refresh", &PropertyEditor::refresh);
ClassDB::bind_method("_draw_transparency", &PropertyEditor::_draw_transparency);
+ ClassDB::bind_method("edit", &PropertyEditor::edit);
ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &PropertyEditor::get_drag_data_fw);
ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &PropertyEditor::can_drop_data_fw);