From d1582a5105f01181535fb859c530e45c2efca071 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 5 Feb 2007 20:20:42 +0000 Subject: merge -r 57111:57464 maintenance. --- indra/llui/llfloater.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/llui/llfloater.cpp') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index b37602093f..8dc0ce5f66 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -506,7 +506,8 @@ void LLFloater::open() /* Flawfinder: ignore */ if (sHostp != NULL && hostp == NULL) { // needs a host - sHostp->addFloater(this, TRUE); + // only select tabs if window they are hosted in is visible + sHostp->addFloater(this, sHostp->getVisible()); } else if (hostp != NULL) { @@ -2578,8 +2579,6 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, if ( select_added_floater ) { mTabContainer->selectLastTab(); - // explicitly call tabopen to load preview assets, etc. - tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), true); } floaterp->setHost(this); @@ -2702,6 +2701,13 @@ void LLMultiFloater::setVisible(BOOL visible) { cur_floaterp->setVisible(visible); } + + // if no tab selected, and we're being shown, + // select last tab to be added + if (visible && !cur_floaterp) + { + mTabContainer->selectLastTab(); + } } } -- cgit v1.2.3