Logic editor: click in active text input buttons didnt work.
This commit is contained in:
2011-03-01 15:54:49 +00:00
parent ef648f617e
commit acd69b9c3f

View File

@@ -1229,12 +1229,12 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho
}
/* mouse inside the widget */
else if (x >= startx) {
float aspect= sqrt(but->block->aspect);
float aspect= (but->block->aspect);
but->pos= strlen(origstr)-but->ofs;
/* XXX does not take zoom level into account */
while (aspect*startx + aspect*BLF_width(fstyle->uifont_id, origstr+but->ofs) > x) {
while (startx + aspect*BLF_width(fstyle->uifont_id, origstr+but->ofs) > x) {
if (but->pos <= 0) break;
but->pos--;
origstr[but->pos+but->ofs] = 0;