diff options
| author | Richard Linden <none@none> | 2012-02-28 13:46:51 -0800 | 
|---|---|---|
| committer | Richard Linden <none@none> | 2012-02-28 13:46:51 -0800 | 
| commit | 26af98b4435609d844f9fefa9ebb7db0a9bd8e0a (patch) | |
| tree | f98fa17179b57afd59f8acdf4d635806b999b256 | |
| parent | 229c00ab2a6e1708db10e893b8c2241a0b3e178a (diff) | |
| parent | 80f2548371328f6fa1936ecc03a85a09f1b19508 (diff) | |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience
| -rw-r--r-- | indra/llui/llfloater.cpp | 44 | ||||
| -rw-r--r-- | indra/llui/llfloater.h | 2 | 
2 files changed, 24 insertions, 22 deletions
| diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index b23230bdd4..f49b4edb98 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -850,7 +850,7 @@ void LLFloater::applyControlsAndPosition(LLFloater* other)  	{  		if (!applyRectControl())  		{ -			applyPositioning(other); +			applyPositioning(other, true);  		}  	}  } @@ -919,7 +919,7 @@ bool LLFloater::applyDockState()  	return docked;  } -void LLFloater::applyPositioning(LLFloater* other) +void LLFloater::applyPositioning(LLFloater* other, bool on_open)  {  	// Otherwise position according to the positioning code  	switch (mPositioning) @@ -934,29 +934,30 @@ void LLFloater::applyPositioning(LLFloater* other)  	case LLFloaterEnums::POSITIONING_CASCADE_GROUP:  	case LLFloaterEnums::POSITIONING_CASCADING: -		if (other != NULL && other != this) +		if (on_open)  		{ -			stackWith(*other); -		} -		else -		{ -			static const U32 CASCADING_FLOATER_HOFFSET = 0; -			static const U32 CASCADING_FLOATER_VOFFSET = 0; +			if (other != NULL && other != this) +			{ +				stackWith(*other); +			} +			else +			{ +				static const U32 CASCADING_FLOATER_HOFFSET = 0; +				static const U32 CASCADING_FLOATER_VOFFSET = 0; -			const LLRect& snap_rect = gFloaterView->getSnapRect(); +				const LLRect& snap_rect = gFloaterView->getSnapRect(); -			const S32 horizontal_offset = CASCADING_FLOATER_HOFFSET; -			const S32 vertical_offset = snap_rect.getHeight() - CASCADING_FLOATER_VOFFSET; +				const S32 horizontal_offset = CASCADING_FLOATER_HOFFSET; +				const S32 vertical_offset = snap_rect.getHeight() - CASCADING_FLOATER_VOFFSET; -			S32 rect_height = getRect().getHeight(); -			setOrigin(horizontal_offset, vertical_offset - rect_height); +				S32 rect_height = getRect().getHeight(); +				setOrigin(horizontal_offset, vertical_offset - rect_height); -			translate(snap_rect.mLeft, snap_rect.mBottom); -			//translateIntoRect(snap_rect); +				translate(snap_rect.mLeft, snap_rect.mBottom); +			} +			//mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED; +			setFollows(FOLLOWS_TOP | FOLLOWS_LEFT);  		} -		mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED; -		setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); -  		break;  	case LLFloaterEnums::POSITIONING_RELATIVE: @@ -1262,6 +1263,7 @@ void LLFloater::setMinimized(BOOL minimize)  		// Reshape *after* setting mMinimized  		reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); +		applyPositioning(NULL, false);  	}  	make_ui_sound("UISndWindowClose"); @@ -2199,7 +2201,7 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)  		if (!floaterp->isMinimized() && floaterp->getCanDrag())  		{  			LLRect old_rect = floaterp->getRect(); -			floaterp->applyPositioning(NULL); +			floaterp->applyPositioning(NULL, false);  			LLRect new_rect = floaterp->getRect();  			//LLRect r = floaterp->getRect(); @@ -3284,7 +3286,7 @@ void LLFloater::stackWith(LLFloater& other)  	setShape(next_rect); -	other.mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED; +	//other.mPositioning = LLFloaterEnums::POSITIONING_SPECIFIED;  	other.setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);  } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 4aa663d57e..64d6dcea04 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -358,7 +358,7 @@ protected:  	virtual bool	applyRectControl();  	bool			applyDockState(); -	void			applyPositioning(LLFloater* other); +	void			applyPositioning(LLFloater* other, bool on_open);  	void			applyRelativePosition();  	void			storeRectControl(); | 
