diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-08-17 20:30:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-17 20:30:20 -0400 |
| commit | 18648fc51e2a0c750182d8aa3814ed5b6bf8445e (patch) | |
| tree | 0517959512fc0d6876780641da88b74dd72aec5b /indra/newview/llfloaterimcontainer.cpp | |
| parent | 6d4c4c029ce43aa413266135829cd2bc00001890 (diff) | |
| parent | 932e8ac318eb2e29ea519249348315b50c7d1d58 (diff) | |
Merge pull request #5638 from secondlife/release/26.3
Release/26.3
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
| -rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 5f9d3ac304..0da56a12a9 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -155,6 +155,11 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const { // The general strategy when a session id is modified is to delete all related objects and create them anew. + // The conversation floater can be active while participant widgets are selected. + // Preserve that state separately so the new conversation widget can be selected + // after the server replaces an outgoing ad-hoc session id. + const bool was_active = old_session_id == getSelectedSession(); + // Note however that the LLFloaterIMSession has its session id updated through a call to sessionInitReplyReceived() // and do not need to be deleted and recreated (trying this creates loads of problems). We do need however to suppress // its related mSessions record as it's indexed with the wrong id. @@ -167,6 +172,11 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const // Create a new conversation with the new id addConversationListItem(new_session_id, change_focus); LLFloaterIMSessionTab::addToHost(new_session_id); + + if (was_active) + { + selectConversationPair(new_session_id, true, false, true); + } } @@ -1726,7 +1736,7 @@ bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) void LLFloaterIMContainer::showConversation(const LLUUID& session_id) { setVisibleAndFrontmost(false); - selectConversationPair(session_id, true); + selectConversationPair(session_id, true, true, true); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); if (session_floater) @@ -1772,13 +1782,13 @@ void LLFloaterIMContainer::selectNextConversationByID(const LLUUID& uuid) } // Synchronous select the conversation item and the conversation floater -bool LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/) +bool LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/, bool force_select_widget/*=false*/) { bool handled = true; LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); /* widget processing */ - if (select_widget && mConversationsRoot->getSelectedCount() <= 1) + if (select_widget && (force_select_widget || mConversationsRoot->getSelectedCount() <= 1)) { LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id); if (widget && widget->getParentFolder()) @@ -1982,7 +1992,7 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c mConversationEventQueue.erase(uuid); // Don't let the focus fall IW, select and refocus on the first conversation in the list - if (change_focus && isInVisibleChain()) + if (change_focus && is_widget_selected && isInVisibleChain()) { setFocus(true); if (new_selection) |
