diff options
author | simon <none@none> | 2013-03-22 14:17:26 -0700 |
---|---|---|
committer | simon <none@none> | 2013-03-22 14:17:26 -0700 |
commit | 1d8e3997c8ced25524f146aeb6cc683e5767a5f7 (patch) | |
tree | 888cc32ac788bcb10dc5df4f0e0124514f4474ef /indra/llui | |
parent | 395f8baf03622f3a36b03b8e31679e3b594b1757 (diff) | |
parent | ef544a22218d59c6a121d4bf88c49868a2b9a713 (diff) |
Pull and merge latest viewer-beta
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 27 | ||||
-rw-r--r-- | indra/llui/lltoolbar.cpp | 5 |
2 files changed, 18 insertions, 14 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 0c43a571b8..6f895ed939 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1483,16 +1483,22 @@ BOOL LLTabContainer::setTab(S32 which) for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; - if (!tuple) - continue; BOOL is_selected = ( tuple == selected_tuple ); - tuple->mButton->setUseEllipses(mUseTabEllipses); - tuple->mButton->setHAlign(mFontHalign); - tuple->mTabPanel->setVisible( is_selected ); -// tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here. - tuple->mButton->setToggleState( is_selected ); - // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs - tuple->mButton->setTabStop( is_selected ); + + // Although the selected tab must be complete, we may have hollow LLTabTuple tucked in the list + if (tuple->mButton) + { + tuple->mButton->setUseEllipses(mUseTabEllipses); + tuple->mButton->setHAlign(mFontHalign); + tuple->mButton->setToggleState( is_selected ); + // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs + tuple->mButton->setTabStop( is_selected ); + } + if (tuple->mTabPanel) + { + tuple->mTabPanel->setVisible( is_selected ); + //tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here. + } if (is_selected) { @@ -1563,8 +1569,7 @@ BOOL LLTabContainer::selectTabByName(const std::string& name) LLPanel* panel = getPanelByName(name); if (!panel) { - llwarns << "LLTabContainer::selectTabByName(" - << name << ") failed" << llendl; + llwarns << "LLTabContainer::selectTabByName(" << name << ") failed" << llendl; return FALSE; } diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index eb6b2fc56a..8f7a4ab62f 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -1057,10 +1057,9 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // Convert drag position into insert position and rank if (!isReadOnly() && handled && !drop) { - LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - LLAssetType::EType type = inv_item->getType(); - if (type == LLAssetType::AT_WIDGET) + if (cargo_type == DAD_WIDGET) { + LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; LLCommandId dragged_command(inv_item->getUUID()); int orig_rank = getRankFromPosition(dragged_command); mDragRank = getRankFromPosition(x, y); |