Bug fix #2972
Copy/Paste bone name buttons crashed, didn't use the callback for buttons proper yet. Also added MAXFRAME defines for buttons, instead of hardcoded values 9000 or 18000
This commit is contained in:
@@ -488,6 +488,13 @@ static int ui_but_copy_paste(uiBut *but, char mode)
|
||||
strncpy(str, but->poin, but->max);
|
||||
}
|
||||
else {
|
||||
char backstr[UI_MAX_DRAW_STR];
|
||||
/* give butfunc the original text too */
|
||||
/* feature used for bone renaming, channels, etc */
|
||||
if(but->func_arg2==NULL) {
|
||||
strncpy(backstr, but->drawstr, UI_MAX_DRAW_STR);
|
||||
but->func_arg2= backstr;
|
||||
}
|
||||
strncpy(but->poin, str, but->max);
|
||||
uibut_do_func(but);
|
||||
ui_check_but(but);
|
||||
|
||||
Reference in New Issue
Block a user