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:
Submodule release/datafiles/locale updated: c842f10f94...cb1967cc63
Submodule release/scripts/addons updated: 8ad356e332...c50944e808
Submodule release/scripts/addons_contrib updated: 7485bc6b11...31545d25c9
2
scons
2
scons
Submodule scons updated: 59512aadd1...2d6ebcb239
@@ -334,7 +334,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
|
|||||||
{
|
{
|
||||||
PointerRNA ptr, lptr, idptr;
|
PointerRNA ptr, lptr, idptr;
|
||||||
PropertyRNA *prop, *lprop;
|
PropertyRNA *prop, *lprop;
|
||||||
int success = 0;
|
bool success = false;
|
||||||
int index;
|
int index;
|
||||||
const bool all = RNA_boolean_get(op->ptr, "all");
|
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;
|
ListBase lb;
|
||||||
|
|
||||||
if (!copy_to_selected_list(C, &ptr, &lb, &use_path))
|
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))) {
|
if (!use_path || (path = RNA_path_from_ID_to_property(&ptr, prop))) {
|
||||||
for (link = lb.first; link; link = link->next) {
|
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_editable(&lptr, lprop)) {
|
||||||
if (RNA_property_copy(&lptr, &ptr, prop, (all) ? -1 : index)) {
|
if (RNA_property_copy(&lptr, &ptr, prop, (all) ? -1 : index)) {
|
||||||
RNA_property_update(C, &lptr, prop);
|
RNA_property_update(C, &lptr, prop);
|
||||||
success = 1;
|
success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user