Beispiel #1
0
void UndoRedo::undo() {

	ERR_FAIL_COND(action_level>0);
	if (current_action<0)
		return; //nothing to redo
	_process_operation_list(actions[current_action].undo_ops.front());
	current_action--;
}
Beispiel #2
0
bool UndoRedo::undo() {

	ERR_FAIL_COND_V(action_level > 0, false);
	if (current_action < 0)
		return false; //nothing to redo
	_process_operation_list(actions.write[current_action].undo_ops.front());
	current_action--;
	version--;
	return true;
}
Beispiel #3
0
void UndoRedo::redo() {

	ERR_FAIL_COND(action_level > 0);

	if ((current_action + 1) >= actions.size())
		return; //nothing to redo
	current_action++;

	_process_operation_list(actions[current_action].do_ops.front());
	version++;
}
Beispiel #4
0
bool UndoRedo::redo() {

	ERR_FAIL_COND_V(action_level > 0, false);

	if ((current_action + 1) >= actions.size())
		return false; //nothing to redo
	current_action++;

	_process_operation_list(actions.write[current_action].do_ops.front());
	version++;

	return true;
}