diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 88c2218f249eee0bb0688ed36682169d77e37429..05261432e3c8b4412f8854ff7c171075c743284f 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -129,7 +129,9 @@ void LLLayoutPanel::setOrientation( LLLayoutStack::ELayoutOrientation orientatio
 		? getRect().getWidth()
 		: getRect().getHeight()));
 
-	if (mAutoResize == FALSE && mMinDim == -1)
+	if (mAutoResize == FALSE 
+		&& mUserResize == TRUE 
+		&& mMinDim == -1 )
 	{
 		setMinDim(layout_dim);
 	}