summaryrefslogtreecommitdiff
path: root/indra/llui/llcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llcombobox.cpp')
-rw-r--r--indra/llui/llcombobox.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 79dce1c714..ee1700e009 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -875,6 +875,20 @@ bool LLComboBox::handleUnicodeCharHere(llwchar uni_char)
return result;
}
+// virtual
+bool LLComboBox::handleScrollWheel(S32 x, S32 y, S32 clicks)
+{
+ if (mList->getVisible()) return mList->handleScrollWheel(x, y, clicks);
+ if (mAllowTextEntry) // We might be editable
+ if (!mList->getFirstSelected()) // We aren't in the list, don't kill their text
+ return false;
+
+ setCurrentByIndex(llclamp(getCurrentIndex() + clicks, 0, getItemCount() - 1));
+ prearrangeList();
+ onCommit();
+ return true;
+}
+
void LLComboBox::setTextEntry(const LLStringExplicit& text)
{
if (mTextEntry)