obsolete UndoRedo max_steps; no users identified
This commit is contained in:
parent
efe27c6ed2
commit
6e932c3108
|
@ -246,13 +246,6 @@ void UndoRedo::commit_action() {
|
|||
|
||||
redo(); // perform action
|
||||
|
||||
if (max_steps > 0 && actions.size() > max_steps) {
|
||||
//clear early steps
|
||||
|
||||
while (actions.size() > max_steps)
|
||||
_pop_history_tail();
|
||||
}
|
||||
|
||||
if (callback && actions.size() > 0) {
|
||||
callback(callback_ud, actions[actions.size() - 1].name);
|
||||
}
|
||||
|
@ -347,16 +340,6 @@ String UndoRedo::get_current_action_name() const {
|
|||
return actions[current_action].name;
|
||||
}
|
||||
|
||||
void UndoRedo::set_max_steps(int p_max_steps) {
|
||||
|
||||
max_steps = p_max_steps;
|
||||
}
|
||||
|
||||
int UndoRedo::get_max_steps() const {
|
||||
|
||||
return max_steps;
|
||||
}
|
||||
|
||||
uint64_t UndoRedo::get_version() const {
|
||||
|
||||
return version;
|
||||
|
@ -385,7 +368,6 @@ UndoRedo::UndoRedo() {
|
|||
version = 1;
|
||||
action_level = 0;
|
||||
current_action = -1;
|
||||
max_steps = -1;
|
||||
merge_mode = MERGE_DISABLE;
|
||||
callback = NULL;
|
||||
callback_ud = NULL;
|
||||
|
@ -510,8 +492,6 @@ void UndoRedo::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("clear_history"), &UndoRedo::clear_history);
|
||||
ClassDB::bind_method(D_METHOD("get_current_action_name"), &UndoRedo::get_current_action_name);
|
||||
ClassDB::bind_method(D_METHOD("get_version"), &UndoRedo::get_version);
|
||||
ClassDB::bind_method(D_METHOD("set_max_steps", "max_steps"), &UndoRedo::set_max_steps);
|
||||
ClassDB::bind_method(D_METHOD("get_max_steps"), &UndoRedo::get_max_steps);
|
||||
ClassDB::bind_method(D_METHOD("redo"), &UndoRedo::redo);
|
||||
ClassDB::bind_method(D_METHOD("undo"), &UndoRedo::undo);
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ private:
|
|||
Vector<Action> actions;
|
||||
int current_action;
|
||||
int action_level;
|
||||
int max_steps;
|
||||
MergeMode merge_mode;
|
||||
uint64_t version;
|
||||
|
||||
|
@ -115,9 +114,6 @@ public:
|
|||
String get_current_action_name() const;
|
||||
void clear_history();
|
||||
|
||||
void set_max_steps(int p_max_steps);
|
||||
int get_max_steps() const;
|
||||
|
||||
uint64_t get_version() const;
|
||||
|
||||
void set_commit_notify_callback(CommitNotifyCallback p_callback, void *p_ud);
|
||||
|
|
|
@ -108,12 +108,6 @@
|
|||
Get the name of the current action.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_max_steps" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_version" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
|
@ -128,14 +122,6 @@
|
|||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_max_steps">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="max_steps" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="undo">
|
||||
<return type="void">
|
||||
</return>
|
||||
|
|
Loading…
Reference in New Issue