feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
#include "core/io/resource.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/templates/local_vector.h"
|
||||
#include "editor/debugger/editor_debugger_inspector.h"
|
||||
#include "editor/debugger/editor_debugger_node.h"
|
||||
#include "editor/editor_log.h"
|
||||
|
|
@ -177,7 +176,7 @@ void EditorUndoRedoManager::_add_do_method(const Variant **p_args, int p_argcoun
|
|||
return;
|
||||
}
|
||||
|
||||
if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) {
|
||||
if (!p_args[1]->is_string()) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.argument = 1;
|
||||
r_error.expected = Variant::STRING_NAME;
|
||||
|
|
@ -206,7 +205,7 @@ void EditorUndoRedoManager::_add_undo_method(const Variant **p_args, int p_argco
|
|||
return;
|
||||
}
|
||||
|
||||
if (p_args[1]->get_type() != Variant::STRING_NAME && p_args[1]->get_type() != Variant::STRING) {
|
||||
if (!p_args[1]->is_string()) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.argument = 1;
|
||||
r_error.expected = Variant::STRING_NAME;
|
||||
|
|
@ -264,6 +263,22 @@ void EditorUndoRedoManager::commit_action(bool p_execute) {
|
|||
history.undo_stack.push_back(pending_action);
|
||||
}
|
||||
|
||||
if (history.id != GLOBAL_HISTORY) {
|
||||
// Clear global redo, to avoid unexpected actions when redoing.
|
||||
History &global = get_or_create_history(GLOBAL_HISTORY);
|
||||
global.redo_stack.clear();
|
||||
global.undo_redo->discard_redo();
|
||||
} else {
|
||||
// On global actions, clear redo of all scenes instead.
|
||||
for (KeyValue<int, History> &E : history_map) {
|
||||
if (E.key == GLOBAL_HISTORY) {
|
||||
continue;
|
||||
}
|
||||
E.value.redo_stack.clear();
|
||||
E.value.undo_redo->discard_redo();
|
||||
}
|
||||
}
|
||||
|
||||
pending_action = Action();
|
||||
is_committing = false;
|
||||
emit_signal(SNAME("history_changed"));
|
||||
|
|
@ -390,7 +405,7 @@ bool EditorUndoRedoManager::has_history(int p_idx) const {
|
|||
return history_map.has(p_idx);
|
||||
}
|
||||
|
||||
void EditorUndoRedoManager::clear_history(bool p_increase_version, int p_idx) {
|
||||
void EditorUndoRedoManager::clear_history(int p_idx, bool p_increase_version) {
|
||||
if (p_idx != INVALID_HISTORY) {
|
||||
History &history = get_or_create_history(p_idx);
|
||||
history.undo_redo->clear_history(p_increase_version);
|
||||
|
|
@ -507,6 +522,7 @@ void EditorUndoRedoManager::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(D_METHOD("get_object_history_id", "object"), &EditorUndoRedoManager::get_history_id_for_object);
|
||||
ClassDB::bind_method(D_METHOD("get_history_undo_redo", "id"), &EditorUndoRedoManager::get_history_undo_redo);
|
||||
ClassDB::bind_method(D_METHOD("clear_history", "id", "increase_version"), &EditorUndoRedoManager::clear_history, DEFVAL(INVALID_HISTORY), DEFVAL(true));
|
||||
|
||||
ADD_SIGNAL(MethodInfo("history_changed"));
|
||||
ADD_SIGNAL(MethodInfo("version_changed"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue