summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 5c1f8429d1..68719bea40 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1343,21 +1343,7 @@ void LLFloater::draw()
}
}
- if( getDefaultButton() )
- {
- if (gFocusMgr.childHasKeyboardFocus( this ) && getDefaultButton()->getEnabled())
- {
- LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
- // is this button a direct descendent and not a nested widget (e.g. checkbox)?
- BOOL focus_is_child_button = focus_ctrl->getWidgetType() == WIDGET_TYPE_BUTTON && focus_ctrl->getParent() == this;
- // only enable default button when current focus is not a button
- getDefaultButton()->setBorderEnabled(!focus_is_child_button);
- }
- else
- {
- getDefaultButton()->setBorderEnabled(FALSE);
- }
- }
+ LLPanel::updateDefaultBtn();
// draw children
LLView* focused_child = gFocusMgr.getKeyboardFocus();
@@ -1368,6 +1354,7 @@ void LLFloater::draw()
focused_child->setVisible(FALSE);
}
+ // don't call LLPanel::draw() since we've implemented custom background rendering
LLView::draw();
if( isBackgroundVisible() )
@@ -2568,6 +2555,11 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater,
{
mTabContainer->selectTabPanel(floaterp);
}
+ else
+ {
+ // reassert visible tab (hiding new floater if necessary)
+ mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
+ }
floaterp->setHost(this);
if (isMinimized())