Skip to content

Commit

Permalink
Merge pull request #58395 from Geometror/editor-node-data-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Mar 30, 2022
2 parents 021cbe8 + 314430b commit b7850bb
Show file tree
Hide file tree
Showing 14 changed files with 601 additions and 656 deletions.
6 changes: 3 additions & 3 deletions editor/animation_track_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3383,7 +3383,7 @@ Node *AnimationTrackEditor::get_root() const {
void AnimationTrackEditor::update_keying() {
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() && animation.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;
Expand Down Expand Up @@ -3776,7 +3776,7 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
return;
}

EditorHistory *history = EditorNode::get_singleton()->get_editor_history();
EditorSelectionHistory *history = EditorNode::get_singleton()->get_editor_selection_history();
for (int i = 1; i < history->get_path_size(); i++) {
String prop = history->get_path_property(i);
ERR_FAIL_COND(prop.is_empty());
Expand Down Expand Up @@ -3856,7 +3856,7 @@ void AnimationTrackEditor::insert_node_value_key(Node *p_node, const String &p_p
}

void AnimationTrackEditor::insert_value_key(const String &p_property, const Variant &p_value, bool p_advance) {
EditorHistory *history = EditorNode::get_singleton()->get_editor_history();
EditorSelectionHistory *history = EditorNode::get_singleton()->get_editor_selection_history();

ERR_FAIL_COND(!root);
// Let's build a node path.
Expand Down
2 changes: 1 addition & 1 deletion editor/debugger/editor_debugger_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
void EditorDebuggerInspector::clear_cache() {
for (const KeyValue<ObjectID, EditorDebuggerRemoteObject *> &E : remote_objects) {
EditorNode *editor = EditorNode::get_singleton();
if (editor->get_editor_history()->get_current() == E.value->get_instance_id()) {
if (editor->get_editor_selection_history()->get_current() == E.value->get_instance_id()) {
editor->push_item(nullptr);
}
memdelete(E.value);
Expand Down
2 changes: 1 addition & 1 deletion editor/debugger/editor_debugger_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void EditorDebuggerNode::_bind_methods() {
}

EditorDebuggerRemoteObject *EditorDebuggerNode::get_inspected_remote_object() {
return Object::cast_to<EditorDebuggerRemoteObject>(ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_history()->get_current()));
return Object::cast_to<EditorDebuggerRemoteObject>(ObjectDB::get_instance(EditorNode::get_singleton()->get_editor_selection_history()->get_current()));
}

ScriptEditorDebugger *EditorDebuggerNode::get_debugger(int p_id) const {
Expand Down
Loading

0 comments on commit b7850bb

Please sign in to comment.