diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llfloatertools.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/llfloatertools.cpp')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 05dd70b..f777581 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -264,7 +264,7 @@ BOOL LLFloaterTools::postBuild() | |||
264 | &LLToolPlacerPanel::sTriangleTorus, | 264 | &LLToolPlacerPanel::sTriangleTorus, |
265 | &LLToolPlacerPanel::sTree, | 265 | &LLToolPlacerPanel::sTree, |
266 | &LLToolPlacerPanel::sGrass}; | 266 | &LLToolPlacerPanel::sGrass}; |
267 | for(int t=0;t<sizeof(toolNames)/sizeof(toolNames[0]);t++) | 267 | for(size_t t=0; t<sizeof(toolNames)/sizeof(toolNames[0]); ++t) |
268 | { | 268 | { |
269 | LLButton *found = LLViewerUICtrlFactory::getButtonByName(this,toolNames[t]); | 269 | LLButton *found = LLViewerUICtrlFactory::getButtonByName(this,toolNames[t]); |
270 | if(found) | 270 | if(found) |
@@ -395,7 +395,7 @@ LLFloaterTools::LLFloaterTools() | |||
395 | factory_map["ContentsInventory"] = LLCallbackMap(createPanelContentsInventory, this);//LLPanelContents | 395 | factory_map["ContentsInventory"] = LLCallbackMap(createPanelContentsInventory, this);//LLPanelContents |
396 | factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo | 396 | factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo |
397 | 397 | ||
398 | gUICtrlFactory->buildFloater(this,"floater_tools.xml",&factory_map); | 398 | gUICtrlFactory->buildFloater(this,"floater_tools.xml",&factory_map,FALSE); |
399 | 399 | ||
400 | mLargeHeight = getRect().getHeight(); | 400 | mLargeHeight = getRect().getHeight(); |
401 | mSmallHeight = mLargeHeight; | 401 | mSmallHeight = mLargeHeight; |
@@ -478,7 +478,7 @@ void LLFloaterTools::resetToolState() | |||
478 | 478 | ||
479 | void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | 479 | void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) |
480 | { | 480 | { |
481 | LLTool *tool = gToolMgr->getCurrentTool( mask ); | 481 | LLTool *tool = gToolMgr->getCurrentTool(); |
482 | 482 | ||
483 | // HACK to allow seeing the buttons when you have the app in a window. | 483 | // HACK to allow seeing the buttons when you have the app in a window. |
484 | // Keep the visibility the same as it | 484 | // Keep the visibility the same as it |
@@ -579,7 +579,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
579 | S32 index = mComboGridMode->getCurrentIndex(); | 579 | S32 index = mComboGridMode->getCurrentIndex(); |
580 | mComboGridMode->removeall(); | 580 | mComboGridMode->removeall(); |
581 | 581 | ||
582 | switch (gSelectMgr->getSelectType()) | 582 | switch (mObjectSelection->getSelectType()) |
583 | { | 583 | { |
584 | case SELECT_TYPE_HUD: | 584 | case SELECT_TYPE_HUD: |
585 | mComboGridMode->add("Screen"); | 585 | mComboGridMode->add("Screen"); |
@@ -726,6 +726,13 @@ BOOL LLFloaterTools::canClose() | |||
726 | } | 726 | } |
727 | 727 | ||
728 | // virtual | 728 | // virtual |
729 | void LLFloaterTools::onOpen() | ||
730 | { | ||
731 | mParcelSelection = gParcelMgr->getFloatingParcelSelection(); | ||
732 | mObjectSelection = gSelectMgr->getEditSelection(); | ||
733 | } | ||
734 | |||
735 | // virtual | ||
729 | void LLFloaterTools::onClose(bool app_quitting) | 736 | void LLFloaterTools::onClose(bool app_quitting) |
730 | { | 737 | { |
731 | setMinimized(FALSE); | 738 | setMinimized(FALSE); |
@@ -744,10 +751,14 @@ void LLFloaterTools::onClose(bool app_quitting) | |||
744 | 751 | ||
745 | resetToolState(); | 752 | resetToolState(); |
746 | 753 | ||
754 | mParcelSelection = NULL; | ||
755 | mObjectSelection = NULL; | ||
756 | |||
747 | // Switch back to basic toolset | 757 | // Switch back to basic toolset |
748 | gCurrentToolset = gBasicToolset; | 758 | gToolMgr->setCurrentToolset(gBasicToolset); |
749 | gBasicToolset->selectFirstTool(); | 759 | // we were already in basic toolset, using build tools |
750 | gToolMgr->useSelectedTool( gBasicToolset ); | 760 | // so manually reset tool to default (pie menu tool) |
761 | gToolMgr->getCurrentToolset()->selectFirstTool(); | ||
751 | } | 762 | } |
752 | 763 | ||
753 | void LLFloaterTools::showMore(BOOL show_more) | 764 | void LLFloaterTools::showMore(BOOL show_more) |
@@ -955,6 +966,5 @@ void LLFloaterTools::setEditTool(void* tool_pointer) | |||
955 | 966 | ||
956 | void LLFloaterTools::onFocusReceived() | 967 | void LLFloaterTools::onFocusReceived() |
957 | { | 968 | { |
958 | gCurrentToolset = gBasicToolset; | 969 | gToolMgr->setCurrentToolset(gBasicToolset); |
959 | gCurrentToolset->selectTool(gCurrentToolset->getSelectedTool()); | 970 | } |
960 | } \ No newline at end of file | ||