summaryrefslogtreecommitdiff
path: root/indra/llui/llcombobox.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-28 12:31:25 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-28 12:31:25 -0800
commitfc8e185fafcfea1ead8b9c064ed38d5ac65f81b6 (patch)
tree86bd9fff165d9752c5a68af9fa87d05c20a51dc7 /indra/llui/llcombobox.cpp
parent3d8bd2b166b86e9fa1416d20dedc111a42c2a348 (diff)
parentd383adfc92e099676313ed930b2c1c8b1a315ae3 (diff)
PE merge.
Diffstat (limited to 'indra/llui/llcombobox.cpp')
-rw-r--r--indra/llui/llcombobox.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index f29e8785eb..9d23daf56d 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -103,7 +103,8 @@ LLComboBox::LLComboBox(const LLComboBox::Params& p)
mPrearrangeCallback(p.prearrange_callback()),
mTextEntryCallback(p.text_entry_callback()),
mListPosition(p.list_position),
- mLastSelectedIndex(-1)
+ mLastSelectedIndex(-1),
+ mLabel(p.label)
{
// Text label button
@@ -490,6 +491,7 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
params.handle_edit_keys_directly(true);
params.commit_on_focus_lost(false);
params.follows.flags(FOLLOWS_ALL);
+ params.label(mLabel);
mTextEntry = LLUICtrlFactory::create<LLLineEditor> (params);
mTextEntry->setText(cur_label);
mTextEntry->setIgnoreTab(TRUE);
@@ -505,7 +507,8 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p)
mButton->setRect(rect);
mButton->setTabStop(TRUE);
mButton->setHAlign(LLFontGL::LEFT);
-
+ mButton->setLabel(mLabel.getString());
+
if (mTextEntry)
{
mTextEntry->setVisible(FALSE);
@@ -633,7 +636,7 @@ void LLComboBox::hideList()
if(mLastSelectedIndex >= 0)
mList->selectNthItem(mLastSelectedIndex);
}
- else
+ else if(mLastSelectedIndex >= 0)
mList->selectNthItem(mLastSelectedIndex);
mButton->setToggleState(FALSE);