diff options
author | Ton Roosendaal <ton@blender.org> | 2006-12-26 13:18:38 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-12-26 13:18:38 +0300 |
commit | d1091296636726149309d59a5d29e24cfd343631 (patch) | |
tree | 9f7452b5f75c4a8e9fbde399a2c42571f560d4cd /source/blender/src/interface_draw.c | |
parent | e4511c805fa3cdebb33f321963fcdb46cc0c4aea (diff) |
Bugfix #5498
Textbutton: SHIFT+Arrow selections did not work proper when the amount of
text in a button was more than its width could display. Now still doesn't
work OK 100% (when selection itself goes outside of button view).
Also: removed the very bad SELWIDTH define (but->selend - but->selsta).
That's not making readable code!
Diffstat (limited to 'source/blender/src/interface_draw.c')
-rw-r--r-- | source/blender/src/interface_draw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index 653b596e5ec..e979d4453cb 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -1464,12 +1464,10 @@ static void ui_draw_text_icon(uiBut *but) /* text button selection and cursor */ if(but->pos != -1) { - if (SELWIDTH > 0) { + if ((but->selend - but->selsta) > 0) { /* text button selection */ selsta_tmp = but->selsta + strlen(but->str); selend_tmp = but->selend + strlen(but->str); - if (but->ofs >= strlen(but->str)) - selsta_tmp += (but->ofs - strlen(but->str)); if(but->drawstr[0]!=0) { ch= but->drawstr[selsta_tmp]; |