Remove the "go back" behavior in track editor for inspector based key editing, fixes #19434, fixes #19423
This commit is contained in:
parent
66871322b9
commit
e5b876e92a
1 changed files with 15 additions and 0 deletions
|
@ -3873,6 +3873,12 @@ struct _AnimMoveRestore {
|
||||||
|
|
||||||
void AnimationTrackEditor::_clear_key_edit() {
|
void AnimationTrackEditor::_clear_key_edit() {
|
||||||
if (key_edit) {
|
if (key_edit) {
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// going back seems like the most comfortable thing to do, but it results
|
||||||
|
// in weird behaviors and crashes, because going back to animation editor
|
||||||
|
// triggers the editor setting up again itself
|
||||||
|
|
||||||
bool go_back = false;
|
bool go_back = false;
|
||||||
if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit) {
|
if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit) {
|
||||||
EditorNode::get_singleton()->push_item(NULL);
|
EditorNode::get_singleton()->push_item(NULL);
|
||||||
|
@ -3885,6 +3891,15 @@ void AnimationTrackEditor::_clear_key_edit() {
|
||||||
if (go_back) {
|
if (go_back) {
|
||||||
EditorNode::get_singleton()->get_inspector_dock()->go_back();
|
EditorNode::get_singleton()->get_inspector_dock()->go_back();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
//if key edit is the object being inspected, remove it first
|
||||||
|
if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit) {
|
||||||
|
EditorNode::get_singleton()->push_item(NULL);
|
||||||
|
}
|
||||||
|
//then actually delete it
|
||||||
|
memdelete(key_edit);
|
||||||
|
key_edit = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue