From 2768663081b27c39202f292ca53d98c381419e12 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Tue, 23 Mar 2010 20:34:12 +0200 Subject: Related to normal bug EXT-5715(Conversations window auto-resizes when new conversation starts.) - disabled auto-resizing of well window if it was reshaped by user. --HG-- branch : product-engine --- indra/newview/llsyswellwindow.cpp | 12 ++++++++++-- indra/newview/llsyswellwindow.h | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 66373feb93..cbb030836e 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -58,7 +58,8 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N mSysWellChiclet(NULL), mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), - IM_WELL_ANCHOR_NAME("im_well_panel") + IM_WELL_ANCHOR_NAME("im_well_panel"), + mIsReshapedByUser(false) { mTypedItemsCount[IT_NOTIFICATION] = 0; @@ -99,6 +100,13 @@ void LLSysWellWindow::setMinimized(BOOL minimize) LLTransientDockableFloater::setMinimized(minimize); } +//--------------------------------------------------------------------------------- +void LLSysWellWindow::handleReshape(const LLRect& rect, bool by_user) +{ + mIsReshapedByUser |= by_user; // mark floater that it is reshaped by user + LLTransientDockableFloater::handleReshape(rect, by_user); +} + //--------------------------------------------------------------------------------- void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask) { @@ -211,7 +219,7 @@ void LLSysWellWindow::reshapeWindow() // it includes height from floater top to list top and from floater bottom and list bottom static S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); - if (isDocked()) // Don't reshape undocked Well window. See EXT-5715. + if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. { S32 notif_list_height = mMessageList->getItemsRect().getHeight() + 2 * mMessageList->getBorderWidth(); diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 3790aa3ea9..296bdf7482 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -70,6 +70,7 @@ public: /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); @@ -121,7 +122,7 @@ protected: typedef std::map typed_items_count_t; typed_items_count_t mTypedItemsCount; - + bool mIsReshapedByUser; }; /** -- cgit v1.2.3