Expose EditorUndoRedoManager's clear_history()
This commit is contained in:
@ -390,7 +390,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 +507,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"));
|
||||
|
||||
Reference in New Issue
Block a user