diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index ea11750e38c2a3b652a4209613657856b072e612..19dc68850469f61fe412d4765cdb8b21faf3a8f0 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -243,13 +243,16 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank)
 		mButtons.insert(it_button,button);
 	}
 
+	mNeedsLayout = true;
+
+	updateLayoutAsNeeded();
+
+
 	if (mButtonAddSignal)
 	{
 		(*mButtonAddSignal)(button);
 	}
 
-	mNeedsLayout = true;
-
 	return true;
 }