summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbar.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-09-27 14:58:20 -0700
committerMerov Linden <merov@lindenlab.com>2011-09-27 14:58:20 -0700
commit0e4f226b56cb2dea1e8d5e9f1267a16c302bb5a9 (patch)
treed3f8361917943ff801e38c5bc42c3c66c441546d /indra/llui/lltoolbar.cpp
parentcc56958452b8c10e1de176edb1924179ad04768a (diff)
EXP-1211 : Read toolbar default settings from toolbars.xml, no saving of settings done yet.
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r--indra/llui/lltoolbar.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 2fb9f249d4..f8effb5bb6 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -187,12 +187,6 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p)
mCenteringStack->addChild(LLUICtrlFactory::create<LLLayoutPanel>(border_panel_p));
- BOOST_FOREACH (const LLCommandId::Params& command_id, p.commands)
- {
- mButtonCommands.push_back(command_id);
- }
- createButtons();
-
mNeedsLayout = true;
}
@@ -202,8 +196,11 @@ bool LLToolBar::addCommand(const LLCommandId& commandId)
bool add_command = (command != NULL);
- mButtonCommands.push_back(commandId);
- createButtons();
+ if (add_command)
+ {
+ mButtonCommands.push_back(commandId);
+ createButtons();
+ }
return add_command;
}