summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2007-08-21 22:17:53 +0000
committerChristian Goetze <cg@lindenlab.com>2007-08-21 22:17:53 +0000
commitce0a5fe14590b8d675b885fccd5f79d7ea17a302 (patch)
tree3388e6f8ff02292ec4521d278c841801462945b8 /indra/newview/llfloatertools.cpp
parentb699ae454d8477d19342d320758cd993d1d28cec (diff)
EFFECTIVE MERGE: svn merge -r 66133:68118 svn+ssh://svn/svn/linden/branches/maintenance into release
Actual action: branched maintenance-r68118, merged in release, then copied result into release
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r--indra/newview/llfloatertools.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 0da0958c9b..22e4004d1a 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -380,13 +380,18 @@ LLFloaterTools::LLFloaterTools()
mSmallHeight = mLargeHeight;
if (mTab) mSmallHeight -= mTab->getRect().getHeight();
- gSavedSettings.setBOOL("ToolboxShowMore", TRUE); // force a toggle initially
- showMore(FALSE);
+ // force a toggle initially. seems to be needed to correctly initialize
+ // both "more" and "less" cases. it also seems to be important to begin
+ // with the user's preference first so that it's initial position will
+ // be correct (SL-51192) -MG
+ BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
+ gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
+ showMore( !show_more ); // does the toggle
+ showMore( show_more ); // reset the real user's preference
}
LLFloaterTools::~LLFloaterTools()
{
- showMore(FALSE);
// children automatically deleted
}
@@ -757,23 +762,20 @@ void LLFloaterTools::showMore(BOOL show_more)
{
reshape( mRect.getWidth(), mLargeHeight, TRUE);
translate( 0, mSmallHeight - mLargeHeight );
- childSetVisible("button less", true);
- childSetVisible("button more", false);
}
else
{
reshape( mRect.getWidth(), mSmallHeight, TRUE);
translate( 0, mLargeHeight - mSmallHeight );
- childSetVisible("button less", false);
- childSetVisible("button more", true);
}
+ childSetVisible("button less", show_more);
+ childSetVisible("button more", !show_more);
}
void LLFloaterTools::showPanel(EInfoPanel panel)
{
llassert(panel >= 0 && panel < PANEL_COUNT);
mTab->selectTabByName(PANEL_NAMES[panel]);
- showMore(TRUE);
}
void click_show_more(void *userdata)