diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_properties.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/rename_dialog.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 6bb4b5e81b..f0d2d51922 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2753,7 +2753,7 @@ void EditorPropertyNodePath::_node_selected(const NodePath &p_path) { } if (!base_node && get_edited_object()->has_method("get_root_path")) { - base_node = get_edited_object()->call("get_root_path"); + base_node = Object::cast_to<Node>(get_edited_object()->call("get_root_path")); } if (!base_node && Object::cast_to<RefCounted>(get_edited_object())) { diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 3f7fd29e27..e9b0b30ceb 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3949,7 +3949,7 @@ void CanvasItemEditor::_selection_changed() { void CanvasItemEditor::edit(CanvasItem *p_canvas_item) { Array selection = editor_selection->get_selected_nodes(); - if (selection.size() != 1 || (Node *)selection[0] != p_canvas_item) { + if (selection.size() != 1 || Object::cast_to<Node>(selection[0]) != p_canvas_item) { drag_type = DRAG_NONE; // Clear the selection diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 9165223948..4610171d68 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6623,7 +6623,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { // For snapping to be performed, there must be solid geometry under at least one of the selected nodes. // We need to check this before snapping to register the undo/redo action only if needed. for (int i = 0; i < keys.size(); i++) { - Node *node = keys[i]; + Node *node = Object::cast_to<Node>(keys[i]); Node3D *sp = Object::cast_to<Node3D>(node); Dictionary d = snap_data[node]; Vector3 from = d["from"]; @@ -6645,7 +6645,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { // Perform snapping if at least one node can be snapped for (int i = 0; i < keys.size(); i++) { - Node *node = keys[i]; + Node *node = Object::cast_to<Node>(keys[i]); Node3D *sp = Object::cast_to<Node3D>(node); Dictionary d = snap_data[node]; Vector3 from = d["from"]; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index f307bbd9c6..2a8882bbd1 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2859,7 +2859,7 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data } if (String(d["type"]) == "script_list_element") { - Node *node = d["script_list_element"]; + Node *node = Object::cast_to<Node>(d["script_list_element"]); ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node); if (se) { @@ -2932,7 +2932,7 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co } if (String(d["type"]) == "script_list_element") { - Node *node = d["script_list_element"]; + Node *node = Object::cast_to<Node>(d["script_list_element"]); ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node); EditorHelp *eh = Object::cast_to<EditorHelp>(node); diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 72686e9eb3..92dcd53830 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -363,7 +363,7 @@ void RenameDialog::_post_popup() { Array selected_node_list = editor_selection->get_selected_nodes(); ERR_FAIL_COND(selected_node_list.size() == 0); - preview_node = selected_node_list[0]; + preview_node = Object::cast_to<Node>(selected_node_list[0]); _update_preview(); _update_substitute(); |