1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Cleanup EditorNode and EditorData

Co-authored-by: Eric M <itsjusteza@gmail.com>
This commit is contained in:
Hendrik Brucker
2022-03-30 20:12:26 +02:00
parent 482cdeaf71
commit 314430b868
14 changed files with 646 additions and 701 deletions

View File

@@ -217,7 +217,7 @@ void ReplicationEditor::update_keying() {
/// TODO make keying usable.
#if 0
bool keying_enabled = false;
EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history();
EditorSelectionHistory *editor_history = EditorNode::get_singleton()->get_editor_selection_history();
if (is_visible_in_tree() && config.is_valid() && editor_history->get_path_size() > 0) {
Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0));
keying_enabled = Object::cast_to<Node>(obj) != nullptr;
@@ -305,7 +305,7 @@ void ReplicationEditor::property_keyed(const String &p_property) {
ERR_FAIL_COND(!current || config.is_null());
Node *root = current->get_node(current->get_root_path());
ERR_FAIL_COND(!root);
EditorHistory *history = EditorNode::get_singleton()->get_editor_history();
EditorSelectionHistory *history = EditorNode::get_singleton()->get_editor_selection_history();
ERR_FAIL_COND(history->get_path_size() == 0);
Node *node = Object::cast_to<Node>(ObjectDB::get_instance(history->get_path_object(0)));
ERR_FAIL_COND(!node);