aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llfloater.cpp')
-rw-r--r--linden/indra/llui/llfloater.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index 41a67f2..ab6bc00 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -834,7 +834,7 @@ void LLFloater::setMinimized(BOOL minimize)
834 LLView* viewp = *child_it; 834 LLView* viewp = *child_it;
835 if (!viewp->getVisible()) 835 if (!viewp->getVisible())
836 { 836 {
837 mMinimizedHiddenChildren.push_back(viewp); 837 mMinimizedHiddenChildren.push_back(viewp->mViewHandle);
838 } 838 }
839 viewp->setVisible(FALSE); 839 viewp->setVisible(FALSE);
840 } 840 }
@@ -897,11 +897,14 @@ void LLFloater::setMinimized(BOOL minimize)
897 viewp->setVisible(TRUE); 897 viewp->setVisible(TRUE);
898 } 898 }
899 899
900 std::vector<LLView*>::iterator itor = mMinimizedHiddenChildren.begin(); 900 std::vector<LLViewHandle>::iterator itor = mMinimizedHiddenChildren.begin();
901 while (itor != mMinimizedHiddenChildren.end()) 901 for ( ; itor != mMinimizedHiddenChildren.end(); ++itor)
902 { 902 {
903 (*itor)->setVisible(FALSE); 903 LLView* viewp = LLView::getViewByHandle(*itor);
904 ++itor; 904 if(viewp)
905 {
906 viewp->setVisible(FALSE);
907 }
905 } 908 }
906 mMinimizedHiddenChildren.clear(); 909 mMinimizedHiddenChildren.clear();
907 910
@@ -2220,7 +2223,6 @@ BOOL LLFloaterView::allChildrenClosed()
2220{ 2223{
2221 // see if there are any visible floaters (some floaters "close" 2224 // see if there are any visible floaters (some floaters "close"
2222 // by setting themselves invisible) 2225 // by setting themselves invisible)
2223 S32 visible_count = 0;
2224 for (child_list_const_iter_t it = getChildList()->begin(); it != getChildList()->end(); ++it) 2226 for (child_list_const_iter_t it = getChildList()->begin(); it != getChildList()->end(); ++it)
2225 { 2227 {
2226 LLView* viewp = *it; 2228 LLView* viewp = *it;
@@ -2228,11 +2230,10 @@ BOOL LLFloaterView::allChildrenClosed()
2228 2230
2229 if (floaterp->getVisible() && floaterp->canClose()) 2231 if (floaterp->getVisible() && floaterp->canClose())
2230 { 2232 {
2231 visible_count++; 2233 return false;
2232 } 2234 }
2233 } 2235 }
2234 2236 return true;
2235 return (visible_count == 0);
2236} 2237}
2237 2238
2238 2239
@@ -2270,14 +2271,22 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
2270 S32 min_height; 2271 S32 min_height;
2271 floater->getResizeLimits( &min_width, &min_height ); 2272 floater->getResizeLimits( &min_width, &min_height );
2272 2273
2274 // Make sure floater isn't already smaller than its min height/width?
2273 S32 new_width = llmax( min_width, view_width ); 2275 S32 new_width = llmax( min_width, view_width );
2274 S32 new_height = llmax( min_height, view_height ); 2276 S32 new_height = llmax( min_height, view_height );
2275 2277
2276 if( (new_width > screen_width) || (new_height > screen_height) ) 2278 if( !allow_partial_outside
2279 && ( (new_width > screen_width)
2280 || (new_height > screen_height) ) )
2277 { 2281 {
2282 // We have to force this window to be inside the screen.
2278 new_width = llmin(new_width, screen_width); 2283 new_width = llmin(new_width, screen_width);
2279 new_height = llmin(new_height, screen_height); 2284 new_height = llmin(new_height, screen_height);
2280 2285
2286 // Still respect minimum width/height
2287 new_width = llmax(new_width, min_width);
2288 new_height = llmax(new_height, min_height);
2289
2281 floater->reshape( new_width, new_height, TRUE ); 2290 floater->reshape( new_width, new_height, TRUE );
2282 2291
2283 // Make sure the damn thing is actually onscreen. 2292 // Make sure the damn thing is actually onscreen.