summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 13:02:19 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 13:30:27 +0200
commit27dae1d96753634c40619af8bc5b982f5238289b (patch)
treec0a0e28d016ee08f82033385450c71b5a268e0ad /indra/newview/llviewermessage.cpp
parent683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff)
parent110eb2c989b6655796c15a657d0898375027f3f2 (diff)
Merge branch 'DRTVWR-591-maint-X' into marchcat/591-x-pbr-merge
# Conflicts: # indra/llrender/llgl.cpp # indra/llrender/llvertexbuffer.cpp # indra/llui/llflatlistview.cpp # indra/newview/app_settings/settings.xml # indra/newview/lldrawpoolground.cpp # indra/newview/llinventorybridge.cpp # indra/newview/llinventorygallery.cpp # indra/newview/llspatialpartition.cpp # indra/newview/llviewercontrol.cpp # indra/newview/llviewertexture.cpp # indra/newview/llvosky.cpp # indra/newview/skins/default/xui/en/menu_inventory.xml
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ada898b98c..0ee5b8f454 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1563,15 +1563,22 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
}
else
{
- // Highlight item
- const BOOL auto_open =
- gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
- !from_name.empty(); // don't open if it's not from anyone.
- if(auto_open)
+ // Highlight item
+ bool show_in_inventory = gSavedSettings.get<bool>("ShowInInventory");
+ bool auto_open =
+ show_in_inventory && // don't open if ShowInInventory is FALSE
+ !from_name.empty(); // don't open if it's not from anyone
+
+ // SL-20419 : Don't change active tab if floater is visible
+ LLFloater* instance = LLFloaterReg::findInstance("inventory");
+ bool use_main_panel = instance && instance->getVisible();
+
+ if (auto_open)
{
LLFloaterReg::showInstance("inventory");
}
- LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true);
+
+ LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, use_main_panel);
}
}
}
@@ -1647,8 +1654,9 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
const LLUUID& blocked_id;
};
- LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
- gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id));
+ LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID,
+ OfferMatcher(blocked_id));
}
@@ -5768,8 +5776,9 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name)
const LLUUID& blocked_id;
};
- LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID(
- gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(task_id));
+ LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(
+ LLNotificationsUI::NOTIFICATION_CHANNEL_UUID,
+ OfferMatcher(task_id));
}
static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb);