UI: more changes for large textfields

- no longer set 'but->drawstr' when editing buttons.
- clip text and set cursor based on the 'editstr'.
This commit is contained in:
2014-05-03 09:18:00 +10:00
parent 8d16869d83
commit 0111f3505f
3 changed files with 36 additions and 33 deletions

View File

@@ -2697,7 +2697,7 @@ void ui_check_but(uiBut *but)
/* if we are doing text editing, this will override the drawstr */
if (but->editstr)
BLI_strncpy(but->drawstr, but->editstr, UI_MAX_DRAW_STR);
but->drawstr[0] = '\0';
/* text clipping moved to widget drawing code itself */
}