summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-02-06 19:43:02 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-02-06 19:43:02 +0200
commit702946a3b3672e54ad652d184f4eee9b86c07170 (patch)
treecc68fc279fea60e3eab03b9ffac436d63b7921b9
parentce40f88ecb09c91061f7a18ad2b52dcaa3df7ca3 (diff)
SL-10485 Double-click should check visibility and open folders
-rw-r--r--indra/newview/llsettingspicker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index e2d6d43ae3..fcc615db6e 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -356,9 +356,9 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
S32 inventory_y = y - mInventoryPanel->getRect().mBottom;
if (mInventoryPanel->parentPointInView(inventory_x, inventory_y))
{
- // make sure item (not folder) is selected
+ // make sure item is selected and visible
LLFolderViewItem* item_viewp = mInventoryPanel->getItemByID(mSettingItemID);
- if (item_viewp && item_viewp->getIsCurSelection())
+ if (item_viewp && item_viewp->getIsCurSelection() && item_viewp->getVisible())
{
LLRect target_rect;
item_viewp->localRectToOtherView(item_viewp->getLocalRect(), &target_rect, this);
@@ -373,10 +373,10 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
(*mCommitSignal)(this, res);
}
closeFloater();
+ // hit inside panel on selected item, double click should do nothing
+ result = TRUE;
}
}
- // hit inside panel on free place or (de)unselected item, double click should do nothing
- result = TRUE;
}
}
@@ -392,7 +392,7 @@ 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())
+ if (item_viewp && item_viewp->getIsCurSelection() && item_viewp->getVisible())
{
// Quick-apply
if (mCommitSignal)