From d1b649055dfdfe17674fec6ef713a33c6f9b09fe Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 5 Apr 2019 22:42:04 +0300 Subject: SL-10890 Ban duration edit field shows value with a left shift if a large value was set --- indra/llui/llspinctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llui/llspinctrl.cpp') diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index f6831c6d5e..ce3fc29d32 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -290,6 +290,7 @@ void LLSpinCtrl::forceSetValue(const LLSD& value ) LLF32UICtrl::setValue(value); updateEditor(); + mEditor->resetScrollPosition(); } } @@ -355,7 +356,9 @@ void LLSpinCtrl::onEditorCommit( const LLSD& data ) if( success ) { - updateEditor(); + // We commited and clamped value + // try to display as much as possible + mEditor->resetScrollPosition(); } else { @@ -475,6 +478,7 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) // text editors don't support revert normally (due to user confusion) // but not allowing revert on a spinner seems dangerous updateEditor(); + mEditor->resetScrollPosition(); mEditor->setFocus(FALSE); return TRUE; } -- cgit v1.2.3