diff options
author | Josh Bell <josh@lindenlab.com> | 2007-12-21 06:44:41 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-12-21 06:44:41 +0000 |
commit | df4d167cd13fd89a85e4d30dca94e40c934707d7 (patch) | |
tree | cde9373bce657013bf04c83ab60b4a4aa826fc76 /indra/llui | |
parent | 8fde5f0d3241205067e5d7bf5380757e764eff31 (diff) |
svn merge -r74200:76302 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-6-Viewer --> release
Wheee, this was fun. Um, let's back-port fixes a little more rapidly next time. Reviewed by CG until alexandria died, did the rest by my lonesome.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 23 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 3 |
2 files changed, 19 insertions, 7 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 59741a799a..76877c2dc4 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -843,7 +843,7 @@ void LLFloater::setMinimized(BOOL minimize) LLView* viewp = *child_it; if (!viewp->getVisible()) { - mMinimizedHiddenChildren.push_back(viewp); + mMinimizedHiddenChildren.push_back(viewp->mViewHandle); } viewp->setVisible(FALSE); } @@ -906,11 +906,14 @@ void LLFloater::setMinimized(BOOL minimize) viewp->setVisible(TRUE); } - std::vector<LLView*>::iterator itor = mMinimizedHiddenChildren.begin(); - while (itor != mMinimizedHiddenChildren.end()) + std::vector<LLViewHandle>::iterator itor = mMinimizedHiddenChildren.begin(); + for ( ; itor != mMinimizedHiddenChildren.end(); ++itor) { - (*itor)->setVisible(FALSE); - ++itor; + LLView* viewp = LLView::getViewByHandle(*itor); + if(viewp) + { + viewp->setVisible(FALSE); + } } mMinimizedHiddenChildren.clear(); @@ -2275,14 +2278,22 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out S32 min_height; floater->getResizeLimits( &min_width, &min_height ); + // Make sure floater isn't already smaller than its min height/width? S32 new_width = llmax( min_width, view_width ); S32 new_height = llmax( min_height, view_height ); - if( (new_width > screen_width) || (new_height > screen_height) ) + if( !allow_partial_outside + && ( (new_width > screen_width) + || (new_height > screen_height) ) ) { + // We have to force this window to be inside the screen. new_width = llmin(new_width, screen_width); new_height = llmin(new_height, screen_height); + // Still respect minimum width/height + new_width = llmax(new_width, min_width); + new_height = llmax(new_height, min_height); + floater->reshape( new_width, new_height, TRUE ); // Make sure the damn thing is actually onscreen. diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index d0494ea6f0..1d88501b01 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -286,7 +286,7 @@ protected: typedef std::map<LLViewHandle, LLFloater*>::iterator handle_map_iter_t; static handle_map_t sFloaterMap; - std::vector<LLView*> mMinimizedHiddenChildren; + std::vector<LLViewHandle> mMinimizedHiddenChildren; BOOL mHasBeenDraggedWhileMinimized; S32 mPreviousMinimizedBottom; @@ -429,3 +429,4 @@ extern LLFloaterView* gFloaterView; #endif // LL_FLOATER_H + |