summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingspicker.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-09-04 13:51:31 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-09-04 13:51:31 +0300
commite5bcd6f50a8247dde1121210150835d968dc214d (patch)
tree27f2d17c397bbebc1a1071248b63dc6d33a43cb7 /indra/newview/llsettingspicker.cpp
parente25d23aaac77f3793207aa0baf59ae64ea5eba41 (diff)
parent2fc8d5ff3cfa1b9ad00b310cd4a6cdb557b9415c (diff)
Merge branch 'develop' into marchcat/b-develop
# Conflicts: # indra/llcommon/llerror.h
Diffstat (limited to 'indra/newview/llsettingspicker.cpp')
-rw-r--r--indra/newview/llsettingspicker.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index 85f0678c4c..24cf543864 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -349,6 +349,11 @@ void LLFloaterSettingsPicker::onButtonCancel()
void LLFloaterSettingsPicker::onButtonSelect()
{
+ applySelectedItemAndCloseFloater();
+}
+
+void LLFloaterSettingsPicker::applySelectedItemAndCloseFloater()
+{
if (mCommitSignal)
{
LLSD res;
@@ -378,14 +383,7 @@ bool LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
if (target_rect.pointInRect(x, y))
{
// Quick-apply
- if (mCommitSignal)
- {
- LLSD res;
- res["ItemId"] = mSettingItemID;
- res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
- (*mCommitSignal)(this, res);
- }
- closeFloater();
+ applySelectedItemAndCloseFloater();
// hit inside panel on selected item, double click should do nothing
result = true;
}
@@ -408,14 +406,7 @@ bool LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
if (item_viewp && item_viewp->getIsCurSelection() && item_viewp->getVisible())
{
// Quick-apply
- if (mCommitSignal)
- {
- LLSD res;
- res["ItemId"] = mSettingItemID;
- res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
- (*mCommitSignal)(this, res);
- }
- closeFloater();
+ applySelectedItemAndCloseFloater();
return true;
}
}
@@ -466,6 +457,9 @@ void LLFloaterSettingsPicker::setSettingsItemId(const LLUUID &settings_id, bool
LLInventoryItem* LLFloaterSettingsPicker::findItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library)
{
+ if (asset_id.isNull())
+ return nullptr;
+
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
LLAssetIDMatches asset_id_matches(asset_id);