aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloatertools.cpp')
-rw-r--r--linden/indra/newview/llfloatertools.cpp41
1 files changed, 17 insertions, 24 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index 9c00ca6..1498d4a 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -106,9 +106,8 @@ void click_popup_rotate_left(void*);
106void click_popup_rotate_reset(void*); 106void click_popup_rotate_reset(void*);
107void click_popup_rotate_right(void*); 107void click_popup_rotate_right(void*);
108void click_popup_dozer_mode(LLUICtrl *, void *user); 108void click_popup_dozer_mode(LLUICtrl *, void *user);
109void click_popup_dozer_size(LLUICtrl *, void *user); 109void commit_slider_dozer_size(LLUICtrl *, void*);
110void commit_slider_dozer_force(LLUICtrl *, void*); 110void commit_slider_dozer_force(LLUICtrl *, void*);
111void click_dozer_size(LLUICtrl *, void*);
112void click_apply_to_selection(void*); 111void click_apply_to_selection(void*);
113void commit_radio_zoom(LLUICtrl *, void*); 112void commit_radio_zoom(LLUICtrl *, void*);
114void commit_radio_orbit(LLUICtrl *, void*); 113void commit_radio_orbit(LLUICtrl *, void*);
@@ -303,14 +302,16 @@ BOOL LLFloaterTools::postBuild()
303 childSetCommitCallback("radio noise",click_popup_dozer_mode, (void*)4); 302 childSetCommitCallback("radio noise",click_popup_dozer_mode, (void*)4);
304 mRadioDozerRevert = getChild<LLCheckBoxCtrl>("radio revert"); 303 mRadioDozerRevert = getChild<LLCheckBoxCtrl>("radio revert");
305 childSetCommitCallback("radio revert",click_popup_dozer_mode, (void*)5); 304 childSetCommitCallback("radio revert",click_popup_dozer_mode, (void*)5);
306 mComboDozerSize = getChild<LLComboBox>("combobox brush size");
307 childSetCommitCallback("combobox brush size",click_dozer_size, (void*)0);
308 if(mComboDozerSize) mComboDozerSize->setCurrentByIndex(0);
309 mBtnApplyToSelection = getChild<LLButton>("button apply to selection"); 305 mBtnApplyToSelection = getChild<LLButton>("button apply to selection");
310 childSetAction("button apply to selection",click_apply_to_selection, (void*)0); 306 childSetAction("button apply to selection",click_apply_to_selection, (void*)0);
311 mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners"); 307 mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners");
312 childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners")); 308 childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners"));
313 309
310 mSliderDozerSize = getChild<LLSlider>("slider brush size");
311 childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0);
312 childSetValue( "slider brush size", gSavedSettings.getS32("LandBrushSize"));
313
314
314 mSliderDozerForce = getChild<LLSlider>("slider force"); 315 mSliderDozerForce = getChild<LLSlider>("slider force");
315 childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0); 316 childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0);
316 // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here 317 // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
@@ -391,7 +392,8 @@ LLFloaterTools::LLFloaterTools()
391 mRadioDozerSmooth(NULL), 392 mRadioDozerSmooth(NULL),
392 mRadioDozerNoise(NULL), 393 mRadioDozerNoise(NULL),
393 mRadioDozerRevert(NULL), 394 mRadioDozerRevert(NULL),
394 mComboDozerSize(NULL), 395 mSliderDozerSize(NULL),
396 mSliderDozerForce(NULL),
395 mBtnApplyToSelection(NULL), 397 mBtnApplyToSelection(NULL),
396 mCheckShowOwners(NULL), 398 mCheckShowOwners(NULL),
397 399
@@ -702,7 +704,6 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
702 if (mRadioSelectLand) mRadioSelectLand->setVisible( land_visible ); 704 if (mRadioSelectLand) mRadioSelectLand->setVisible( land_visible );
703 705
704 S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction"); 706 S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction");
705 S32 dozer_size = gSavedSettings.getS32("RadioLandBrushSize");
706 707
707 if (mRadioDozerFlatten) 708 if (mRadioDozerFlatten)
708 { 709 {
@@ -734,17 +735,17 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
734 mRadioDozerRevert ->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 5); 735 mRadioDozerRevert ->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 5);
735 mRadioDozerRevert ->setVisible( land_visible ); 736 mRadioDozerRevert ->setVisible( land_visible );
736 } 737 }
737 if (mComboDozerSize)
738 {
739 mComboDozerSize ->setCurrentByIndex(dozer_size);
740 mComboDozerSize ->setVisible( land_visible );
741 mComboDozerSize ->setEnabled( tool == LLToolBrushLand::getInstance() );
742 }
743 if (mBtnApplyToSelection) 738 if (mBtnApplyToSelection)
744 { 739 {
745 mBtnApplyToSelection->setVisible( land_visible ); 740 mBtnApplyToSelection->setVisible( land_visible );
746 mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstance()->selectionEmpty() && tool != LLToolSelectLand::getInstance()); 741 mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstance()->selectionEmpty() && tool != LLToolSelectLand::getInstance());
747 } 742 }
743 if (mSliderDozerSize)
744 {
745 mSliderDozerSize ->setVisible( land_visible );
746 childSetVisible("Brush:", land_visible);
747 childSetVisible("Brush Size:", land_visible);
748 }
748 if (mCheckShowOwners) 749 if (mCheckShowOwners)
749 { 750 {
750 mCheckShowOwners ->setVisible( land_visible ); 751 mCheckShowOwners ->setVisible( land_visible );
@@ -933,23 +934,15 @@ void click_popup_rotate_right(void*)
933 934
934void click_popup_dozer_mode(LLUICtrl *, void *user) 935void click_popup_dozer_mode(LLUICtrl *, void *user)
935{ 936{
936 S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners");
937 S32 mode = (S32)(intptr_t) user; 937 S32 mode = (S32)(intptr_t) user;
938 gFloaterTools->setEditTool( LLToolBrushLand::getInstance() ); 938 gFloaterTools->setEditTool( LLToolBrushLand::getInstance() );
939 gSavedSettings.setS32("RadioLandBrushAction", mode); 939 gSavedSettings.setS32("RadioLandBrushAction", mode);
940 gSavedSettings.setBOOL("ShowParcelOwners", show_owners);
941}
942
943void click_popup_dozer_size(LLUICtrl *, void *user)
944{
945 S32 size = (S32)(intptr_t) user;
946 gSavedSettings.setS32("RadioLandBrushSize", size);
947} 940}
948 941
949void click_dozer_size(LLUICtrl *ctrl, void *user) 942void commit_slider_dozer_size(LLUICtrl *ctrl, void*)
950{ 943{
951 S32 size = ((LLComboBox*) ctrl)->getCurrentIndex(); 944 S32 size = (S32)ctrl->getValue().asInteger();
952 gSavedSettings.setS32("RadioLandBrushSize", size); 945 gSavedSettings.setS32("LandBrushSize", size);
953} 946}
954 947
955void commit_slider_dozer_force(LLUICtrl *ctrl, void*) 948void commit_slider_dozer_force(LLUICtrl *ctrl, void*)