Fixed multi floater tear-off and hosting (nearby chat, tabbed IM floaters)

ZiRee 2012-02-09 02:37:21 +01:00
parent 314f3b4e72
commit 58a9550b9e
2 changed files with 8 additions and 1 deletions

View File

@ -1792,6 +1792,10 @@ void LLFloater::setTornOff(bool torn_off)
else if (!torn_off) // Attach to parent.
{
storeRectControl();
// <FS:Zi> Mark floater as hosted here already, so any storeRectControl() call
// will know NOT to save floater sizes.
mTornOff = false; // <FS:Zi>
// save the current size and position -Zi
setExpandedRect( getRect() );
LLMultiFloater* new_host = (LLMultiFloater*)mLastHostHandle.get();
@ -1807,7 +1811,7 @@ void LLFloater::setTornOff(bool torn_off)
// make sure host is visible
new_host->openFloater(new_host->getKey());
}
mTornOff = false;
// mTornOff = false; // <FS:Zi> This would be too late, so we moved it up
}
updateTitleButtons();

View File

@ -339,6 +339,9 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp)
floaterp->setHost(NULL);
floaterp->applyRectControl();
// <FS:Zi> Make sure the floater doesn't resize with screen size changes
floaterp->setFollowsNone(); // <FS:Zi>
updateResizeLimits();
tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false);