summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingspicker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsettingspicker.cpp')
-rw-r--r--indra/newview/llsettingspicker.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index b82be3a23e..d115f6fa4f 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -105,6 +105,7 @@ BOOL LLFloaterSettingsPicker::postBuild()
mInventoryPanel->setSelectCallback([this](const LLFloaterSettingsPicker::itemlist_t &items, bool useraction){ onSelectionChange(items, useraction); });
mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ mInventoryPanel->setSuppressOpenItemAction(true);
// Disable auto selecting first filtered item because it takes away
// selection from the item set by LLTextureCtrl owning this floater.
@@ -336,6 +337,24 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
return result;
}
+BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
+{
+ if ((key == KEY_RETURN) && (mask == MASK_NONE))
+ {
+ LLFolderViewItem* item_viewp = mInventoryPanel->getItemByID(mSettingItemID);
+ if (item_viewp && item_viewp->getIsCurSelection())
+ {
+ // Quick-apply
+ if (mCommitSignal)
+ (*mCommitSignal)(this, LLSD(mSettingItemID));
+ closeFloater();
+ return TRUE;
+ }
+ }
+
+ return LLFloater::handleKeyHere(key, mask);
+}
+
//=========================================================================
void LLFloaterSettingsPicker::setActive(bool active)
{