diff options
author | Rider Linden <rider@lindenlab.com> | 2018-12-21 15:31:37 -0800 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-12-21 15:31:37 -0800 |
commit | fb093ce412697a281756dcbbe5451d681f113aa7 (patch) | |
tree | 380f0b855c628bf1740110235fda96e6fde72039 /indra/newview/llsettingspicker.cpp | |
parent | 8227a0b270f6e7cc521adeb7b97ad2d5fb646973 (diff) | |
parent | 91952ec0a5343cd60f09e8bd5779fd0d49d0a886 (diff) |
Merge
Diffstat (limited to 'indra/newview/llsettingspicker.cpp')
-rw-r--r-- | indra/newview/llsettingspicker.cpp | 19 |
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) { |