Fix T38809: regression, text cursor offset in number buttons

Use the same offset for all edit-buttons now.
This commit is contained in:
2014-02-25 10:28:41 +11:00
parent e643d2c211
commit d0ec83c1a2
3 changed files with 36 additions and 15 deletions

View File

@@ -1795,6 +1795,21 @@ int ui_get_but_string_max_length(uiBut *but)
return UI_MAX_DRAW_STR;
}
uiBut *ui_get_but_drag_multi_edit(uiBut *but)
{
uiBut *but_iter;
BLI_assert(but->flag & UI_BUT_DRAG_MULTI);
for (but_iter = but->block->buttons.first; but_iter; but_iter = but_iter->next) {
if (but_iter->editstr) {
break;
}
}
return but_iter;
}
static double ui_get_but_scale_unit(uiBut *but, double value)
{
UnitSettings *unit = but->block->unit;