Bugfix #26251
Logic editor: click in active text input buttons didnt work.
This commit is contained in:
@@ -1229,12 +1229,12 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho
|
|||||||
}
|
}
|
||||||
/* mouse inside the widget */
|
/* mouse inside the widget */
|
||||||
else if (x >= startx) {
|
else if (x >= startx) {
|
||||||
float aspect= sqrt(but->block->aspect);
|
float aspect= (but->block->aspect);
|
||||||
|
|
||||||
but->pos= strlen(origstr)-but->ofs;
|
but->pos= strlen(origstr)-but->ofs;
|
||||||
|
|
||||||
/* XXX does not take zoom level into account */
|
/* 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;
|
if (but->pos <= 0) break;
|
||||||
but->pos--;
|
but->pos--;
|
||||||
origstr[but->pos+but->ofs] = 0;
|
origstr[but->pos+but->ofs] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user