Fix for potential bug in copy-to-selected ui button operator: Return

value was mixing operator result with an int/boolean.
This commit is contained in:
Lukas Tönne
2014-03-10 09:51:59 +01:00
parent 99e20d7b89
commit 19935f0fc3
5 changed files with 7 additions and 7 deletions

2
scons

Submodule scons updated: 59512aadd1...2d6ebcb239

View File

@@ -334,7 +334,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr, lptr, idptr;
PropertyRNA *prop, *lprop;
int success = 0;
bool success = false;
int index;
const bool all = RNA_boolean_get(op->ptr, "all");
@@ -349,7 +349,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
ListBase lb;
if (!copy_to_selected_list(C, &ptr, &lb, &use_path))
return success;
return OPERATOR_CANCELLED;
if (!use_path || (path = RNA_path_from_ID_to_property(&ptr, prop))) {
for (link = lb.first; link; link = link->next) {
@@ -368,7 +368,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
if (RNA_property_editable(&lptr, lprop)) {
if (RNA_property_copy(&lptr, &ptr, prop, (all) ? -1 : index)) {
RNA_property_update(C, &lptr, prop);
success = 1;
success = true;
}
}
}