diff options
Diffstat (limited to 'indra/newview/lltoolbarview.cpp')
-rw-r--r-- | indra/newview/lltoolbarview.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 81ad96f39e..b2318f9158 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -76,7 +76,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p) mShowToolbars(true), mDragToolbarButton(NULL), mDragItem(NULL), - mToolbarsLoaded(false) + mToolbarsLoaded(false), + mBottomToolbarPanel(NULL) { for (S32 i = 0; i < TOOLBAR_COUNT; i++) { @@ -100,6 +101,7 @@ BOOL LLToolBarView::postBuild() mToolbars[TOOLBAR_LEFT] = getChild<LLToolBar>("toolbar_left"); mToolbars[TOOLBAR_RIGHT] = getChild<LLToolBar>("toolbar_right"); mToolbars[TOOLBAR_BOTTOM] = getChild<LLToolBar>("toolbar_bottom"); + mBottomToolbarPanel = getChild<LLView>("bottom_toolbar_panel"); for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++) { @@ -239,8 +241,9 @@ bool LLToolBarView::loadToolbars(bool force_default) LLXUIParser parser; if (!err) { - parser.readXUI(root, toolbar_set, toolbar_file); + parser.readXUI(root, toolbar_set, toolbar_file); } + if (!err && !toolbar_set.validateBlock()) { llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl; @@ -252,8 +255,9 @@ bool LLToolBarView::loadToolbars(bool force_default) if (force_default) { llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl; - return false; - } + return false; + } + // Try to load the default toolbars return loadToolbars(true); } @@ -603,7 +607,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) { BOOL handled = FALSE; - LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; + LLInventoryObject* inv_item = static_cast<LLInventoryObject*>(cargo_data); LLAssetType::EType type = inv_item->getType(); if (type == LLAssetType::AT_WIDGET) |