diff options
Diffstat (limited to 'linden/indra/newview/llfloatertools.cpp')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 8d4d6e2..9ce5d35 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -106,9 +106,8 @@ void click_popup_rotate_left(void*); | |||
106 | void click_popup_rotate_reset(void*); | 106 | void click_popup_rotate_reset(void*); |
107 | void click_popup_rotate_right(void*); | 107 | void click_popup_rotate_right(void*); |
108 | void click_popup_dozer_mode(LLUICtrl *, void *user); | 108 | void click_popup_dozer_mode(LLUICtrl *, void *user); |
109 | void click_popup_dozer_size(LLUICtrl *, void *user); | 109 | void commit_slider_dozer_size(LLUICtrl *, void*); |
110 | void commit_slider_dozer_force(LLUICtrl *, void*); | 110 | void commit_slider_dozer_force(LLUICtrl *, void*); |
111 | void click_dozer_size(LLUICtrl *, void*); | ||
112 | void click_apply_to_selection(void*); | 111 | void click_apply_to_selection(void*); |
113 | void commit_radio_zoom(LLUICtrl *, void*); | 112 | void commit_radio_zoom(LLUICtrl *, void*); |
114 | void commit_radio_orbit(LLUICtrl *, void*); | 113 | void commit_radio_orbit(LLUICtrl *, void*); |
@@ -303,14 +302,13 @@ 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"); | ||
312 | childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners")); | ||
313 | 307 | ||
308 | mSliderDozerSize = getChild<LLSlider>("slider brush size"); | ||
309 | childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0); | ||
310 | childSetValue( "slider brush size", gSavedSettings.getS32("LandBrushSize")); | ||
311 | |||
314 | mSliderDozerForce = getChild<LLSlider>("slider force"); | 312 | mSliderDozerForce = getChild<LLSlider>("slider force"); |
315 | childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0); | 313 | 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 | 314 | // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here |
@@ -391,10 +389,9 @@ LLFloaterTools::LLFloaterTools() | |||
391 | mRadioDozerSmooth(NULL), | 389 | mRadioDozerSmooth(NULL), |
392 | mRadioDozerNoise(NULL), | 390 | mRadioDozerNoise(NULL), |
393 | mRadioDozerRevert(NULL), | 391 | mRadioDozerRevert(NULL), |
394 | mComboDozerSize(NULL), | 392 | mSliderDozerSize(NULL), |
393 | mSliderDozerForce(NULL), | ||
395 | mBtnApplyToSelection(NULL), | 394 | mBtnApplyToSelection(NULL), |
396 | mCheckShowOwners(NULL), | ||
397 | |||
398 | 395 | ||
399 | mTab(NULL), | 396 | mTab(NULL), |
400 | mPanelPermissions(NULL), | 397 | mPanelPermissions(NULL), |
@@ -702,7 +699,6 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
702 | if (mRadioSelectLand) mRadioSelectLand->setVisible( land_visible ); | 699 | if (mRadioSelectLand) mRadioSelectLand->setVisible( land_visible ); |
703 | 700 | ||
704 | S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction"); | 701 | S32 dozer_mode = gSavedSettings.getS32("RadioLandBrushAction"); |
705 | S32 dozer_size = gSavedSettings.getS32("RadioLandBrushSize"); | ||
706 | 702 | ||
707 | if (mRadioDozerFlatten) | 703 | if (mRadioDozerFlatten) |
708 | { | 704 | { |
@@ -734,20 +730,16 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
734 | mRadioDozerRevert ->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 5); | 730 | mRadioDozerRevert ->set( tool == LLToolBrushLand::getInstance() && dozer_mode == 5); |
735 | mRadioDozerRevert ->setVisible( land_visible ); | 731 | mRadioDozerRevert ->setVisible( land_visible ); |
736 | } | 732 | } |
737 | if (mComboDozerSize) | ||
738 | { | ||
739 | mComboDozerSize ->setCurrentByIndex(dozer_size); | ||
740 | mComboDozerSize ->setVisible( land_visible ); | ||
741 | mComboDozerSize ->setEnabled( tool == LLToolBrushLand::getInstance() ); | ||
742 | } | ||
743 | if (mBtnApplyToSelection) | 733 | if (mBtnApplyToSelection) |
744 | { | 734 | { |
745 | mBtnApplyToSelection->setVisible( land_visible ); | 735 | mBtnApplyToSelection->setVisible( land_visible ); |
746 | mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstance()->selectionEmpty() && tool != LLToolSelectLand::getInstance()); | 736 | mBtnApplyToSelection->setEnabled( land_visible && !LLViewerParcelMgr::getInstance()->selectionEmpty() && tool != LLToolSelectLand::getInstance()); |
747 | } | 737 | } |
748 | if (mCheckShowOwners) | 738 | if (mSliderDozerSize) |
749 | { | 739 | { |
750 | mCheckShowOwners ->setVisible( land_visible ); | 740 | mSliderDozerSize ->setVisible( land_visible ); |
741 | childSetVisible("Brush:", land_visible); | ||
742 | childSetVisible("Brush Size:", land_visible); | ||
751 | } | 743 | } |
752 | if (mSliderDozerForce) | 744 | if (mSliderDozerForce) |
753 | { | 745 | { |
@@ -933,23 +925,15 @@ void click_popup_rotate_right(void*) | |||
933 | 925 | ||
934 | void click_popup_dozer_mode(LLUICtrl *, void *user) | 926 | void click_popup_dozer_mode(LLUICtrl *, void *user) |
935 | { | 927 | { |
936 | S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners"); | ||
937 | S32 mode = (S32)(intptr_t) user; | 928 | S32 mode = (S32)(intptr_t) user; |
938 | gFloaterTools->setEditTool( LLToolBrushLand::getInstance() ); | 929 | gFloaterTools->setEditTool( LLToolBrushLand::getInstance() ); |
939 | gSavedSettings.setS32("RadioLandBrushAction", mode); | 930 | gSavedSettings.setS32("RadioLandBrushAction", mode); |
940 | gSavedSettings.setBOOL("ShowParcelOwners", show_owners); | ||
941 | } | ||
942 | |||
943 | void click_popup_dozer_size(LLUICtrl *, void *user) | ||
944 | { | ||
945 | S32 size = (S32)(intptr_t) user; | ||
946 | gSavedSettings.setS32("RadioLandBrushSize", size); | ||
947 | } | 931 | } |
948 | 932 | ||
949 | void click_dozer_size(LLUICtrl *ctrl, void *user) | 933 | void commit_slider_dozer_size(LLUICtrl *ctrl, void*) |
950 | { | 934 | { |
951 | S32 size = ((LLComboBox*) ctrl)->getCurrentIndex(); | 935 | S32 size = (S32)ctrl->getValue().asInteger(); |
952 | gSavedSettings.setS32("RadioLandBrushSize", size); | 936 | gSavedSettings.setS32("LandBrushSize", size); |
953 | } | 937 | } |
954 | 938 | ||
955 | void commit_slider_dozer_force(LLUICtrl *ctrl, void*) | 939 | void commit_slider_dozer_force(LLUICtrl *ctrl, void*) |