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:
2005-09-03 10:50:21 +00:00
parent b787bc2829
commit fd7d224d4c
5 changed files with 22 additions and 15 deletions

View File

@@ -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);