From fd9f3b9fe945cb86f677f5b0cf31302d10bcfa99 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 26 Jul 2011 14:26:27 -0700 Subject: EXP-1021 FIX Position of web content browser dictates position of profile panel - profile panel position changes do not persist EXP-1030 FIX Search button toggle can get out of synch in bottom bar made llinstancetracker::iterator do own nested level management (removing need for separate guard) added support for filename= to floaters can pass in arbitrary window_class to floaters --- indra/llui/llfloaterreg.cpp | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index f5e6444287..1463d0bfbb 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -57,7 +57,7 @@ void LLFloaterReg::add(const std::string& name, const std::string& filename, con } //static -LLRect LLFloaterReg::getFloaterRect(const std::string& name) +LLFloater* LLFloaterReg::getLastFloaterInGroup(const std::string& name) { LLRect rect; const std::string& groupname = sGroupMap[name]; @@ -66,20 +66,10 @@ LLRect LLFloaterReg::getFloaterRect(const std::string& name) instance_list_t& list = sInstanceMap[groupname]; if (!list.empty()) { - static LLUICachedControl floater_offset ("UIFloaterOffset", 16); - LLFloater* last_floater = list.back(); - if (last_floater->getHost()) - { - rect = last_floater->getHost()->getRect(); - } - else - { - rect = last_floater->getRect(); - } - rect.translate(floater_offset, -floater_offset); + return list.back(); } } - return rect; + return NULL; } //static @@ -137,12 +127,12 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) res->applySavedVariables(); // Can't apply rect and dock state until setting instance name if (res->mAutoTile && !res->getHost() && index > 0) { - const LLRect& cur_rect = res->getRect(); - LLRect next_rect = getFloaterRect(groupname); - next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, cur_rect.getWidth(), cur_rect.getHeight()); - res->setRect(next_rect); - res->setRectControl(LLStringUtil::null); // don't save rect of tiled floaters - gFloaterView->adjustToFitScreen(res, true); + LLFloater* last_floater = getLastFloaterInGroup(groupname); + if (last_floater) + { + res->stackWith(*last_floater); + gFloaterView->adjustToFitScreen(res, true); + } } else { -- cgit v1.2.3