summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-06-22 23:44:13 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-06-22 23:44:13 -0300
commit0805e83e59a5dd245176f3ced93cf5f637496bc8 (patch)
tree2e29a5a704360ac64f1df4a02de4e186bc9fdd7d
parent29e644c20ad9eb19b702e839d19be4359086159f (diff)
small in place fixes
-rw-r--r--core/undo_redo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 53b7078b39..f565070216 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -343,7 +343,7 @@ UndoRedo::~UndoRedo() {
Variant UndoRedo::_add_do_method(const Variant** p_args, int p_argcount, Variant::CallError& r_error) {
- if (p_argcount<1) {
+ if (p_argcount<2) {
r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument=0;
return Variant();
@@ -382,7 +382,7 @@ Variant UndoRedo::_add_do_method(const Variant** p_args, int p_argcount, Variant
Variant UndoRedo::_add_undo_method(const Variant** p_args, int p_argcount, Variant::CallError& r_error) {
- if (p_argcount<1) {
+ if (p_argcount<2) {
r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument=0;
return Variant();
@@ -455,11 +455,11 @@ void UndoRedo::_bind_methods() {
ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"add_undo_method",&UndoRedo::_add_undo_method,mi,defargs);
}
- ObjectTypeDB::bind_method(_MD("add_do_property","object", "property", "value"),&UndoRedo::add_do_property);
- ObjectTypeDB::bind_method(_MD("add_undo_property","object", "property", "value"),&UndoRedo::add_undo_property);
+ ObjectTypeDB::bind_method(_MD("add_do_property","object", "property", "value:var"),&UndoRedo::add_do_property);
+ ObjectTypeDB::bind_method(_MD("add_undo_property","object", "property", "value:var"),&UndoRedo::add_undo_property);
ObjectTypeDB::bind_method(_MD("add_do_reference","object"),&UndoRedo::add_do_reference);
ObjectTypeDB::bind_method(_MD("add_undo_reference","object"),&UndoRedo::add_undo_reference);
ObjectTypeDB::bind_method(_MD("clear_history"),&UndoRedo::clear_history);
ObjectTypeDB::bind_method(_MD("get_current_action_name"),&UndoRedo::get_current_action_name);
ObjectTypeDB::bind_method(_MD("get_version"),&UndoRedo::get_version);
-} \ No newline at end of file
+}