diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index df5d488..4aa817e 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -400,13 +400,18 @@ LLFloaterTools::LLFloaterTools() | |||
400 | mSmallHeight = mLargeHeight; | 400 | mSmallHeight = mLargeHeight; |
401 | if (mTab) mSmallHeight -= mTab->getRect().getHeight(); | 401 | if (mTab) mSmallHeight -= mTab->getRect().getHeight(); |
402 | 402 | ||
403 | gSavedSettings.setBOOL("ToolboxShowMore", TRUE); // force a toggle initially | 403 | // force a toggle initially. seems to be needed to correctly initialize |
404 | showMore(FALSE); | 404 | // both "more" and "less" cases. it also seems to be important to begin |
405 | // with the user's preference first so that it's initial position will | ||
406 | // be correct (SL-51192) -MG | ||
407 | BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference | ||
408 | gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below | ||
409 | showMore( !show_more ); // does the toggle | ||
410 | showMore( show_more ); // reset the real user's preference | ||
405 | } | 411 | } |
406 | 412 | ||
407 | LLFloaterTools::~LLFloaterTools() | 413 | LLFloaterTools::~LLFloaterTools() |
408 | { | 414 | { |
409 | showMore(FALSE); | ||
410 | // children automatically deleted | 415 | // children automatically deleted |
411 | } | 416 | } |
412 | 417 | ||
@@ -777,23 +782,20 @@ void LLFloaterTools::showMore(BOOL show_more) | |||
777 | { | 782 | { |
778 | reshape( mRect.getWidth(), mLargeHeight, TRUE); | 783 | reshape( mRect.getWidth(), mLargeHeight, TRUE); |
779 | translate( 0, mSmallHeight - mLargeHeight ); | 784 | translate( 0, mSmallHeight - mLargeHeight ); |
780 | childSetVisible("button less", true); | ||
781 | childSetVisible("button more", false); | ||
782 | } | 785 | } |
783 | else | 786 | else |
784 | { | 787 | { |
785 | reshape( mRect.getWidth(), mSmallHeight, TRUE); | 788 | reshape( mRect.getWidth(), mSmallHeight, TRUE); |
786 | translate( 0, mLargeHeight - mSmallHeight ); | 789 | translate( 0, mLargeHeight - mSmallHeight ); |
787 | childSetVisible("button less", false); | ||
788 | childSetVisible("button more", true); | ||
789 | } | 790 | } |
791 | childSetVisible("button less", show_more); | ||
792 | childSetVisible("button more", !show_more); | ||
790 | } | 793 | } |
791 | 794 | ||
792 | void LLFloaterTools::showPanel(EInfoPanel panel) | 795 | void LLFloaterTools::showPanel(EInfoPanel panel) |
793 | { | 796 | { |
794 | llassert(panel >= 0 && panel < PANEL_COUNT); | 797 | llassert(panel >= 0 && panel < PANEL_COUNT); |
795 | mTab->selectTabByName(PANEL_NAMES[panel]); | 798 | mTab->selectTabByName(PANEL_NAMES[panel]); |
796 | showMore(TRUE); | ||
797 | } | 799 | } |
798 | 800 | ||
799 | void click_show_more(void *userdata) | 801 | void click_show_more(void *userdata) |