CHUI-797 FIXED Only one separated conversation window is shown after exiting from mouselook view
Added all separated conversation floaters to skip list used in gFloaterView->popVisibleAll(skip_list) in llagent.cpp since LLFloaterIMContainer::setVisible() takes control of them by itself.master
parent
9ab92603ce
commit
fa36f85b00
|
|
@ -3258,6 +3258,11 @@ bool LLFloater::isShown() const
|
|||
return ! isMinimized() && isInVisibleChain();
|
||||
}
|
||||
|
||||
bool LLFloater::isDetachedAndNotMinimized()
|
||||
{
|
||||
return !getHost() && !isMinimized();
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool LLFloater::isShown(const LLFloater* floater)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ public:
|
|||
void center();
|
||||
|
||||
LLMultiFloater* getHost();
|
||||
bool isDetachedAndNotMinimized();
|
||||
|
||||
void applyTitle();
|
||||
std::string getCurrentTitle() const;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include "llenvmanager.h"
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloatercamera.h"
|
||||
#include "llfloaterimcontainer.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llgroupactions.h"
|
||||
|
|
@ -90,6 +91,7 @@
|
|||
#include "llworld.h"
|
||||
#include "llworldmap.h"
|
||||
#include "stringize.h"
|
||||
#include "boost/foreach.hpp"
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
|
|
@ -2002,7 +2004,16 @@ void LLAgent::endAnimationUpdateUI()
|
|||
{
|
||||
skip_list.insert(LLFloaterReg::findInstance("mini_map"));
|
||||
}
|
||||
|
||||
|
||||
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
|
||||
LLFloaterIMContainer::floater_list_t conversations;
|
||||
im_box->getDetachedConversationFloaters(conversations);
|
||||
BOOST_FOREACH(LLFloater* conversation, conversations)
|
||||
{
|
||||
llinfos << "skip_list.insert(session_floater): " << conversation->getTitle() << llendl;
|
||||
skip_list.insert(conversation);
|
||||
}
|
||||
|
||||
gFloaterView->popVisibleAll(skip_list);
|
||||
#endif
|
||||
mViewsPushed = FALSE;
|
||||
|
|
|
|||
|
|
@ -340,16 +340,20 @@ void LLConversationViewSession::setVisibleIfDetached(BOOL visible)
|
|||
{
|
||||
// Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
|
||||
// Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
|
||||
LLFolderViewModelItem* item = mViewModelItem;
|
||||
LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
|
||||
LLFloater* session_floater = LLFloaterIMSessionTab::getConversation(session_uuid);
|
||||
|
||||
if (session_floater && !session_floater->getHost() && !session_floater->isMinimized())
|
||||
LLFloater* session_floater = getSessionFloater();
|
||||
if (session_floater && session_floater->isDetachedAndNotMinimized())
|
||||
{
|
||||
session_floater->setVisible(visible);
|
||||
}
|
||||
}
|
||||
|
||||
LLFloater* LLConversationViewSession::getSessionFloater()
|
||||
{
|
||||
LLFolderViewModelItem* item = mViewModelItem;
|
||||
LLUUID session_uuid = dynamic_cast<LLConversationItem*>(item)->getUUID();
|
||||
return LLFloaterIMSessionTab::getConversation(session_uuid);
|
||||
}
|
||||
|
||||
LLConversationViewParticipant* LLConversationViewSession::findParticipant(const LLUUID& participant_id)
|
||||
{
|
||||
// This is *not* a general tree parsing algorithm. We search only in the mItems list
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ public:
|
|||
|
||||
/*virtual*/ void setFlashState(bool flash_state);
|
||||
|
||||
LLFloater* getSessionFloater();
|
||||
|
||||
private:
|
||||
|
||||
void onCurrentVoiceSessionChanged(const LLUUID& session_id);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
#include "llworld.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "boost/foreach.hpp"
|
||||
|
||||
//
|
||||
// LLFloaterIMContainer
|
||||
|
|
@ -660,6 +661,23 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
|
|||
LLMultiFloater::setVisible(visible);
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& floaters)
|
||||
{
|
||||
typedef conversations_widgets_map::value_type conv_pair;
|
||||
BOOST_FOREACH(conv_pair item, mConversationsWidgets)
|
||||
{
|
||||
LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(item.second);
|
||||
if (widget)
|
||||
{
|
||||
LLFloater* session_floater = widget->getSessionFloater();
|
||||
if (session_floater && session_floater->isDetachedAndNotMinimized())
|
||||
{
|
||||
floaters.push_back(session_floater);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
|
||||
{
|
||||
LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
|
||||
|
|
|
|||
|
|
@ -194,6 +194,8 @@ public:
|
|||
bool isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget);
|
||||
boost::signals2::connection mMicroChangedSignal;
|
||||
S32 getConversationListItemSize() { return mConversationsWidgets.size(); }
|
||||
typedef std::list<LLFloater*> floater_list_t;
|
||||
void getDetachedConversationFloaters(floater_list_t& floaters);
|
||||
|
||||
private:
|
||||
LLConversationViewSession* createConversationItemWidget(LLConversationItem* item);
|
||||
|
|
|
|||
Loading…
Reference in New Issue