From 59c6dc7ed6be989a9fd7a0688fe6e823d3b68baa Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 30 Oct 2009 17:54:22 -0400 Subject: Floaters can be resized again - fix for regression introduced yesterday by me. Floater drag handle visibility/enablement was getting lost during construction. Reviewed with Richard. --- indra/llui/llfloater.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index c8e26ecaea..37ff15ac58 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -267,21 +267,14 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mButtonsEnabled[i] = FALSE; mButtons[i] = NULL; } - for (S32 i = 0; i < 4; i++) - { - mResizeBar[i] = NULL; - mResizeHandle[i] = NULL; - } + addDragHandle(); + addResizeCtrls(); initFromParams(p); // chrome floaters don't take focus at all setFocusRoot(!getIsChrome()); - addDragHandle(); - addResizeCtrls(); - enableResizeCtrls(mResizable); - initFloater(); } @@ -2560,7 +2553,7 @@ void LLFloater::setupParamsForExport(Params& p, LLView* parent) void LLFloater::initFromParams(const LLFloater::Params& p) { - // *NOTE: We have too many classes derived from LLPanel to retrofit them + // *NOTE: We have too many classes derived from LLFloater to retrofit them // all to pass in params via constructors. So we use this method. // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible @@ -2574,11 +2567,10 @@ void LLFloater::initFromParams(const LLFloater::Params& p) setCanMinimize(p.can_minimize); setCanClose(p.can_close); setCanDock(p.can_dock); + setCanResize(p.can_resize); + setResizeLimits(p.min_width, p.min_height); mDragOnLeft = p.can_drag_on_left; - mResizable = p.can_resize; - mMinWidth = p.min_width; - mMinHeight = p.min_height; mHeaderHeight = p.header_height; mLegacyHeaderHeight = p.legacy_header_height; mSingleInstance = p.single_instance; -- cgit v1.2.3