diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-09-17 20:29:45 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-09-17 20:29:45 +0300 |
commit | 53a93d3e73892f633b1d79de359924d733489bdb (patch) | |
tree | bee6598e4c7b976fa7f5f6f8364b1f6ee179a94a /indra/newview/llsettingspicker.cpp | |
parent | 8a65439c76437476d62b3f52fa26fea7ea1c6740 (diff) |
SL-9654 EEP Double click should apply instead of opening in settings picker
Diffstat (limited to 'indra/newview/llsettingspicker.cpp')
-rw-r--r-- | indra/newview/llsettingspicker.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index 06d54825e7..f72c7c5dcf 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -302,6 +302,37 @@ void LLFloaterSettingsPicker::onButtonSelect() closeFloater(); } +BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + if (mSettingAssetID.notNull() + && mInventoryPanel) + { + LLUUID item_id = findItemID(mSettingAssetID, FALSE); + S32 inventory_x = x - mInventoryPanel->getRect().mLeft; + S32 inventory_y = y - mInventoryPanel->getRect().mBottom; + if (item_id.notNull() + && mInventoryPanel->parentPointInView(inventory_x, inventory_y)) + { + // make sure item (not folder) is selected + LLFolderViewItem* item_viewp = mInventoryPanel->getItemByID(item_id); + if (item_viewp && item_viewp->isSelected()) + { + LLRect target_rect; + item_viewp->localRectToOtherView(item_viewp->getLocalRect(), &target_rect, this); + if (target_rect.pointInRect(x, y)) + { + // Quick-apply + if (mCommitSignal) + (*mCommitSignal)(this, LLSD(mSettingAssetID)); + closeFloater(); + return TRUE; + } + } + } + } + return LLFloater::handleDoubleClick(x, y, mask); +} + //========================================================================= void LLFloaterSettingsPicker::setActive(bool active) { |