diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-03-21 16:10:43 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-03-21 16:10:43 +0200 |
commit | 4e2f5cda29c39ef041f773a4b897f3cfb0332f77 (patch) | |
tree | d6ac11974b32727eeccfc8a68e975f29ffd61981 /indra | |
parent | eddd952cdeaaabf1b2ab91e9b62aec553621ff82 (diff) |
SL-10727 FIXED Profile windows are not using last set size
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfloater.cpp | 17 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterprofile.cpp | 1 |
3 files changed, 16 insertions, 3 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a245dd8f78..d1e0b3e0b7 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -252,6 +252,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mMinHeight(p.min_height), mHeaderHeight(p.header_height), mLegacyHeaderHeight(p.legacy_header_height), + mDefaultRectForGroup(true), mMinimized(FALSE), mForeground(FALSE), mFirstLook(TRUE), @@ -892,7 +893,10 @@ bool LLFloater::applyRectControl() if (last_in_group && last_in_group != this) { // other floaters in our group, position ourselves relative to them and don't save the rect - mRectControl.clear(); + if (mDefaultRectForGroup) + { + mRectControl.clear(); + } mPositioning = LLFloaterEnums::POSITIONING_CASCADE_GROUP; } else @@ -3399,8 +3403,15 @@ void LLFloater::stackWith(LLFloater& other) } next_rect.translate(floater_offset, -floater_offset); - next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, getRect().getWidth(), getRect().getHeight()); - + const LLRect& rect = getControlGroup()->getRect(mRectControl); + if (rect.notEmpty() && !mDefaultRectForGroup && mResizable) + { + next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight())); + } + else + { + next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, getRect().getWidth(), getRect().getHeight()); + } setShape(next_rect); if (!other.getHost()) diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 165f67499b..475a790b14 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -436,6 +436,7 @@ public: protected: bool mSaveRect; + bool mDefaultRectForGroup; std::string mRectControl; std::string mPosXControl; std::string mPosYControl; diff --git a/indra/newview/llfloaterprofile.cpp b/indra/newview/llfloaterprofile.cpp index 6b8f881b08..1bf5826c29 100644 --- a/indra/newview/llfloaterprofile.cpp +++ b/indra/newview/llfloaterprofile.cpp @@ -39,6 +39,7 @@ LLFloaterProfile::LLFloaterProfile(const LLSD& key) mAvatarId(key["id"].asUUID()), mNameCallbackConnection() { + mDefaultRectForGroup = false; } LLFloaterProfile::~LLFloaterProfile() |