Commit 91c5237e authored by Kitty Barnett's avatar Kitty Barnett
Browse files

Merged with .Catznip tip

--HG--
branch : Catznip
parents f8afa120 218c9faa
6e2bc24862d208434fcbe3aff9cac4accc380a60
\ No newline at end of file
444bdc1538bdf38ec06f24ba4ccb5bd21a23370b
\ No newline at end of file
6541e2f9c8024f2ef41cd0c0fda135a5a592bd3a
\ No newline at end of file
ce606b41c2c29d7f0d8a1e5eee41eb188efd2847
\ No newline at end of file
e004787acc14f48d640f17ba89871f765f2b8cf0
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
e004787acc14f48d640f17ba89871f765f2b8cf0
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
54e81f61aca5bf7c655fb4bf94553aaca0251e43
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
5118dbc0c5e1f8ff963248cb11b21f3623ba1341
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
d21f616969ed44a8383803602041f89703875230
\ No newline at end of file
6d2ccb19d3b4b0ad0a990793c99eb2abc9eb8ee0
\ No newline at end of file
7e30e8e8e09c5a2a9be662c225715bd14e23195a
\ No newline at end of file
8afbb1bf15157f51bfdc769576c4422a0543535c
\ No newline at end of file
24e80f3d5252ee0a6774861c3587d6f0c5dfe253
\ No newline at end of file
ce606b41c2c29d7f0d8a1e5eee41eb188efd2847
\ No newline at end of file
83c5d883f158852f53bc5c688ebb087b19e3a2bf
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
c7ed738e775ebe9babb210c45eafc3054fa9b931
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
54fd792bf83a1106fcf17ed678d8e47211b3ee0c
\ No newline at end of file
4c96598948f0485816e4fcb9793dfaa0185c15cb
\ No newline at end of file
......@@ -1216,6 +1216,7 @@ a563f7e215c7883c1cfd20908085687a0ed96284 RLVa-1.4.0
674db463770b78f836fc9c87a1b2235e212a576c RLVa-1.4.7
7fc0f5d537b46dc1a9f09a1db4ac67752e3462b1 RLVa-2.0.0
9372d6c0a565581d907a8d6d2dda74a5ae05ade5 RLVa-2.1.0
06290281ca53c25721b043fbb1843438402d47ba RLVa-2.2.0
83c76ab719126dea85b71862fc9bd9b2e8204b9f Catznip-R11.0.1
edcabef2decc7d6af0aaf75edf437b77f2c0687a Catznip-R11.0.3
e9dd5e09a1c7df04b516010c3cfd2468e8a2124e Catznip-R11.0.4
......
......@@ -64,7 +64,11 @@ void NotificationPriorityValues::declareValues()
LLNotificationForm::FormElementBase::FormElementBase()
: name("name"),
enabled("enabled", true)
// enabled("enabled", true),
// [SL:KB] - Patch: Inventory-OfferToast | Checked: Catznip-5.3
enabled("enabled", true),
visible_payload("visible_payload")
// [/SL:KB]
{}
LLNotificationForm::FormIgnore::FormIgnore()
......
......@@ -170,6 +170,9 @@ class LLNotificationForm
{
Optional<std::string> name;
Optional<bool> enabled;
// [SL:KB] - Patch: Inventory-OfferToast | Checked: Catznip-5.3
Optional<std::string> visible_payload;
// [/SL:KB]
FormElementBase();
};
......
......@@ -2096,6 +2096,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
registrar.add("Url.GroupChat", boost::bind(&LLUrlAction::startGroupChat, url));
registrar.add("Url.OfferTeleport", boost::bind(&LLUrlAction::offerTeleport, url));
registrar.add("Url.RequestTeleport", boost::bind(&LLUrlAction::requestTeleport, url));
registrar.add("Url.ShowItem", boost::bind(&LLUrlAction::showItem, url));
// [/SL:KB]
registrar.add("Url.ShowOnMap", boost::bind(&LLUrlAction::showLocationOnMap, url));
// [SL:KB] - Patch: Agent-DisplayNames | Checked: 2011-03-19 (Catznip-3.0.0a) | Added: Catznip-2.5.0a
......@@ -2126,6 +2127,21 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
{
mPopupMenuHandle = menu->getHandle();
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
if (mCanPreviewItemSignal)
{
const LLUUID& idItem = LLUUID(LLUrlAction::getInventoryID(url));
if (idItem.notNull())
{
bool canPreview = *(*mCanPreviewItemSignal)(idItem);
if (!canPreview)
{
menu->getChild<LLView>("preview_item")->setEnabled(canPreview);
}
}
}
// [/SL:KB]
if (mIsFriendSignal)
{
bool isFriend = *(*mIsFriendSignal)(LLUUID(LLUrlAction::getUserID(url)));
......@@ -3375,6 +3391,17 @@ boost::signals2::connection LLTextBase::setURLClickedCallback(const commit_signa
return mURLClickSignal->connect(cb);
}
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
boost::signals2::connection LLTextBase::setCanPreviewItemCallback(const can_preview_signal_t::slot_type& cb)
{
if (!mCanPreviewItemSignal)
{
mCanPreviewItemSignal = new can_preview_signal_t();
}
return mCanPreviewItemSignal->connect(cb);
}
// [/SL:KB]
boost::signals2::connection LLTextBase::setIsFriendCallback(const is_friend_signal_t::slot_type& cb)
{
if (!mIsFriendSignal)
......
......@@ -291,6 +291,9 @@ class LLTextBase
friend class LLNormalTextSegment;
friend class LLUICtrlFactory;
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
typedef boost::signals2::signal<bool (const LLUUID& item_id)> can_preview_signal_t;
// [/SL:KB]
typedef boost::signals2::signal<bool (const LLUUID& user_id)> is_friend_signal_t;
typedef boost::signals2::signal<bool (const LLUUID& blocked_id, const std::string from)> is_blocked_signal_t;
......@@ -503,6 +506,9 @@ class LLTextBase
virtual void appendImageSegment(const LLStyle::Params& style_params);
virtual void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo);
boost::signals2::connection setURLClickedCallback(const commit_signal_t::slot_type& cb);
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
boost::signals2::connection setCanPreviewItemCallback(const can_preview_signal_t::slot_type& cb);
// [/SL:KB]
boost::signals2::connection setIsFriendCallback(const is_friend_signal_t::slot_type& cb);
boost::signals2::connection setIsObjectBlockedCallback(const is_blocked_signal_t::slot_type& cb);
......@@ -775,6 +781,9 @@ class LLTextBase
commit_signal_t* mURLClickSignal;
// Used to check if user with given ID is avatar's friend
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
can_preview_signal_t* mCanPreviewItemSignal = nullptr;
// [/SL:KB]
is_friend_signal_t* mIsFriendSignal;
is_blocked_signal_t* mIsObjectBlockedSignal;
......
......@@ -208,6 +208,22 @@ void LLUrlAction::showProfile(std::string url)
}
}
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
std::string LLUrlAction::getInventoryID(std::string url)
{
LLURI uri(url);
LLSD path_array = uri.pathArray();
std::string id_str;
// Only grab the UUID if it's an inventory URL
const std::string strCommand = path_array.get(1).asString();
if ( (path_array.size() == 4) && ("inventory" == strCommand) )
{
id_str = path_array.get(2).asString();
}
return id_str;
}
// [/SL:KB]
std::string LLUrlAction::getUserID(std::string url)
{
LLURI uri(url);
......@@ -285,6 +301,16 @@ void LLUrlAction::requestTeleport(const std::string& url)
executeSLURL("secondlife:///app/agent/" + strAgentId + "/requestteleport");
}
}
void LLUrlAction::showItem(const std::string& url)
{
const std::string strItemId = getInventoryID(url);
if (LLUUID::validate(strItemId))
{
executeSLURL("secondlife:///app/inventory/" + strItemId + "/show");
}
}
// [/SL:KB]
void LLUrlAction::addFriend(std::string url)
......
......@@ -88,6 +88,9 @@ class LLUrlAction
/// if the Url specifies an SL command in the form like 'app/{cmd}/{id}/*', show its profile
static void showProfile(std::string url);
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
static std::string getInventoryID(std::string url);
// [/SL:KB]
static std::string getUserID(std::string url);
static std::string getObjectName(std::string url);
static std::string getObjectId(std::string url);
......@@ -96,6 +99,7 @@ class LLUrlAction
static void startGroupChat(const std::string& url);
static void offerTeleport(const std::string& url);
static void requestTeleport(const std::string& url);
static void showItem(const std::string& url);
// [/SL:KB]
static void addFriend(std::string url);
static void removeFriend(std::string url);
......
......@@ -12369,6 +12369,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowInventoryFolderTextureTips</key>
<map>
<key>Comment</key>
<string>Show a texture tooltip when the mouse hovers over an inventory folder containing a single texture</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<boolean>1</boolean>
</map>
<key>ShowLandHoverTip</key>
<map>
<key>Comment</key>
......@@ -16968,6 +16979,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>ShowDerezzedInventory</key>
<map>
<key>Comment</key>
<string>Show inventory window with last derezzed/picked up object selected</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>ShowOfferedInventory</key>
<map>
<key>Comment</key>
......
......@@ -49,6 +49,9 @@
#include "lltrans.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
#include "llinventoryfunctions.h"
// [/SL:KB]
#include "llmutelist.h"
#include "llstylemap.h"
#include "llslurl.h"
......@@ -1150,6 +1153,9 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
editor_params.show_context_menu = "true";
editor_params.trusted_content = false;
mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this);
// [SL:KB] - Patch: UI-UrlContextMenu | Checked: Catznip-5.4
mEditor->setCanPreviewItemCallback(boost::bind(&can_preview_item, _1));
// [/SL/KB]
mEditor->setIsFriendCallback(LLAvatarActions::isFriend);
mEditor->setIsObjectBlockedCallback(boost::bind(&LLMuteList::isMuted, LLMuteList::getInstance(), _1, _2, 0));
// [SL:KB] - Patch: Chat-Alerts | Checked: 2012-07-10 (Catznip-3.3)
......
......@@ -35,6 +35,9 @@
#include "llwaterparammanager.h"
#include "llwlhandlers.h"
#include "llwlparammanager.h"
// [SL:KB] - Patch: Settings-Troubleshooting | Checked: Catznip-5.4
#include "llstartup.h"
// [/SL:KB]
// [RLVa:KB] - Checked: 2011-09-04 (RLVa-1.4.1a) | Added: RLVa-1.4.1a
#include <boost/algorithm/string.hpp>
#include "rlvhandler.h"
......@@ -369,6 +372,35 @@ void LLEnvManagerNew::loadUserPrefs()
}
}
// [SL:KB] - Patch: Settings-Troubleshooting | Checked: Catznip-5.4
void LLEnvManagerNew::resetUserPrefs()
{
const std::string strSettings[] =
{
"WaterPresetName",
"SkyPresetName",
"DayCycleName",
"UseEnvironmentFromRegion",
"UseDayCycle"
};
for (int idxSetting = 0, cntSetting = sizeof(strSettings) / sizeof(std::string); idxSetting < cntSetting; idxSetting++)
{
if (LLControlVariable* pControl = gSavedSettings.getControl(strSettings[idxSetting]))
{
pControl->resetToDefault(false);
}
}
if (LLStartUp::getStartupState() >= STATE_STARTED)
{
LLEnvManagerNew::instance().loadUserPrefs();
LLEnvManagerNew::instance().updateManagersFromPrefs(false);
LLEnvManagerNew::instance().mUsePrefsChangeSignal();
}
}
// [/SL:KB]
void LLEnvManagerNew::saveUserPrefs()
{
gSavedSettings.setString("WaterPresetName", getWaterPresetName());
......
......@@ -305,6 +305,9 @@ class LLEnvManagerNew : public LLSingleton<LLEnvManagerNew>
// debugging methods
void dumpUserPrefs();
void dumpPresets();
// [SL:KB] - Patch: Settings-Troubleshooting | Checked: Catznip-5.4
static void resetUserPrefs();
// [/SL:KB]
// Misc.
void requestRegionSettings();
......
......@@ -102,17 +102,20 @@ class LLFilePickerCallbackThread : public LLFilePickerThread
/*virtual*/ void notify(const std::vector<std::string>& files)
{
switch (mPickerType)
if (!files.empty())
{
case OPEN_SINGLE:
case SAVE_SINGLE:
mSingleCb( (!files.empty()) ? files.front() : LLStringUtil::null);
break;
case OPEN_MULTIPLE:
mMultiCb(files);
break;
default:
break;
switch (mPickerType)
{
case OPEN_SINGLE:
case SAVE_SINGLE:
mSingleCb( (!files.empty()) ? files.front() : LLStringUtil::null);
break;
case OPEN_MULTIPLE:
mMultiCb(files);
break;
default:
break;
}
}
}
......
......@@ -310,6 +310,21 @@ void LLFloaterEditDayCycle::refreshDayCyclesList()
mDayCyclesCombo->setLabel(getString("combo_label"));
}
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void LLFloaterEditDayCycle::selectDayCycle(const std::string& strDayCycle)
{
if (!isNewDay())
{
if (/*const*/ LLScrollListItem* pItem = mDayCyclesCombo->getListControl()->getItemByLabel(strDayCycle))
{
S32 idxItem = mDayCyclesCombo->getListControl()->getItemIndex(pItem);
mDayCyclesCombo->selectNthItem(idxItem);
mDayCyclesCombo->onCommit();
}
}
}
// [/SL:KB]
void LLFloaterEditDayCycle::onTimeSliderMoved()
{
/// get the slider value
......
......@@ -52,6 +52,9 @@ class LLFloaterEditDayCycle : public LLFloater
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void draw();
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void selectDayCycle(const std::string& strDayCycle);
// [/SL:KB]
private:
/// sync the time slider with day cycle structure
......
......@@ -323,6 +323,21 @@ void LLFloaterEditSky::setColorSwatch(const std::string& name, const WLColorCont
getChild<LLColorSwatchCtrl>(name)->set(LLColor4(color_vec / k));
}
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void LLFloaterEditSky::selectSkyPreset(const std::string& strSkyPreset)
{
if (!isNewPreset())
{
if (/*const*/ LLScrollListItem* pItem = mSkyPresetCombo->getListControl()->getItemByLabel(strSkyPreset))
{
S32 idxItem = mSkyPresetCombo->getListControl()->getItemIndex(pItem);
mSkyPresetCombo->selectNthItem(idxItem);
mSkyPresetCombo->onCommit();
}
}
}
// [/SL:KB]
// color control callbacks
void LLFloaterEditSky::onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl)
{
......@@ -512,27 +527,44 @@ void LLFloaterEditSky::onGlowBMoved(LLUICtrl* ctrl, void* userdata)
LLWLParamManager::getInstance()->propagateParameters();
}
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void LLFloaterEditSky::onFloatControlMoved(LLUICtrl* ctrl, void* userdata)
{
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
WLFloatControl * floatControl = static_cast<WLFloatControl *>(userdata);
onFloatControlMoved(sldr_ctrl, floatControl);
}
void LLFloaterEditSky::onFloatControlMoved(LLSliderCtrl* sldr_ctrl, WLFloatControl* floatControl)
{
LLWLParamManager::getInstance()->mAnimator.deactivate();
floatControl->x = sldr_ctrl->getValueF32() / floatControl->mult;
floatControl->update(LLWLParamManager::getInstance()->mCurParams);
LLWLParamManager::getInstance()->propagateParameters();
}
// [/SL:KB]
//void LLFloaterEditSky::onFloatControlMoved(LLUICtrl* ctrl, void* userdata)
//{
// LLWLParamManager::getInstance()->mAnimator.deactivate();
//
// LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
// WLFloatControl * floatControl = static_cast<WLFloatControl *>(userdata);
//
// floatControl->x = sldr_ctrl->getValueF32() / floatControl->mult;
//
// floatControl->update(LLWLParamManager::getInstance()->mCurParams);
// LLWLParamManager::getInstance()->propagateParameters();
//}
// Lighting callbacks
// time of day
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
{
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLMultiSliderCtrl* sun_msldr = getChild<LLMultiSliderCtrl>("WLSunPos");
LLSliderCtrl* east_sldr = getChild<LLSliderCtrl>("WLEastAngle");
LLTimeCtrl* time_ctrl = getChild<LLTimeCtrl>("WLDayTime");
......@@ -541,11 +573,18 @@ void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
F32 time24 = sun_msldr->getCurSliderValue();
time_ctrl->setTime24(time24); // sync the time ctrl with the new sun position
onSunEastAngleChanged(F_TWO_PI * time24_to_sun_pos(time24), F_TWO_PI * east_sldr->getValueF32(), color_ctrl);
}
void LLFloaterEditSky::onSunEastAngleChanged(F32 sun_angle, F32 east_angle, WLColorControl* color_ctrl)
{
LLWLParamManager::getInstance()->mAnimator.deactivate();
// get the two angles
LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
param_mgr->mCurParams.setSunAngle(F_TWO_PI * time24_to_sun_pos(time24));
param_mgr->mCurParams.setEastAngle(F_TWO_PI * east_sldr->getValueF32());
param_mgr->mCurParams.setSunAngle(sun_angle);
param_mgr->mCurParams.setEastAngle(east_angle);
// set the sun vector
color_ctrl->r = -sin(param_mgr->mCurParams.getEastAngle()) *
......@@ -558,6 +597,36 @@ void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
color_ctrl->update(param_mgr->mCurParams);
param_mgr->propagateParameters();
}
// [/SL:KB]
//void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
//{
// LLWLParamManager::getInstance()->mAnimator.deactivate();
//
// LLMultiSliderCtrl* sun_msldr = getChild<LLMultiSliderCtrl>("WLSunPos");
// LLSliderCtrl* east_sldr = getChild<LLSliderCtrl>("WLEastAngle");
// LLTimeCtrl* time_ctrl = getChild<LLTimeCtrl>("WLDayTime");
// WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
//
// F32 time24 = sun_msldr->getCurSliderValue();
// time_ctrl->setTime24(time24); // sync the time ctrl with the new sun position
//
// // get the two angles
// LLWLParamManager * param_mgr = LLWLParamManager::getInstance();
//
// param_mgr->mCurParams.setSunAngle(F_TWO_PI * time24_to_sun_pos(time24));
// param_mgr->mCurParams.setEastAngle(F_TWO_PI * east_sldr->getValueF32());
//
// // set the sun vector
// color_ctrl->r = -sin(param_mgr->mCurParams.getEastAngle()) *
// cos(param_mgr->mCurParams.getSunAngle());
// color_ctrl->g = sin(param_mgr->mCurParams.getSunAngle());
// color_ctrl->b = cos(param_mgr->mCurParams.getEastAngle()) *
// cos(param_mgr->mCurParams.getSunAngle());
// color_ctrl->i = 1.f;
//
// color_ctrl->update(param_mgr->mCurParams);
// param_mgr->propagateParameters();
//}
void LLFloaterEditSky::onTimeChanged()
{
......
......@@ -34,6 +34,9 @@ class LLButton;
class LLCheckBoxCtrl;
class LLComboBox;
class LLLineEditor;
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
class LLSliderCtrl;
// [/SL:KB]
/**
* Floater for creating or editing a sky preset.
......@@ -41,6 +44,9 @@ class LLLineEditor;
class LLFloaterEditSky : public LLFloater
{
LOG_CLASS(LLFloaterEditSky);
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
friend class LLQuickPrefsWindlightPanel;
// [/SL:KB]
public:
LLFloaterEditSky(const LLSD &key);
......@@ -50,6 +56,9 @@ class LLFloaterEditSky : public LLFloater
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void draw();
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void selectSkyPreset(const std::string& strSkyPreset);
// [/SL:KB]
private:
void initCallbacks(void);
......@@ -65,6 +74,9 @@ class LLFloaterEditSky : public LLFloater
void onColorControlGMoved(LLUICtrl* ctrl, void* userdata);
void onColorControlBMoved(LLUICtrl* ctrl, void* userdata);
void onFloatControlMoved(LLUICtrl* ctrl, void* userdata);
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
static void onFloatControlMoved(LLSliderCtrl* sldr_ctrl, WLFloatControl* floatControl);
// [/SL:KB]
// lighting callbacks for glow
void onGlowRMoved(LLUICtrl* ctrl, void* userdata);
......@@ -72,6 +84,9 @@ class LLFloaterEditSky : public LLFloater
// lighting callbacks for sun
void onSunMoved(LLUICtrl* ctrl, void* userdata);
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
static void onSunEastAngleChanged(F32 sun_angle, F32 east_angle, WLColorControl* color_ctrl);
// [/SL:KB]
void onTimeChanged();
// for handling when the star slider is moved to adjust the alpha
......
......@@ -600,6 +600,21 @@ void LLFloaterEditWater::onWaterPresetNameEdited()
mSaveButton->setEnabled(!getCurrentPresetName().empty());
}
// [SL:KB] - Patch: Settings-QuickPrefsWindlight | Checked: Catznip-5.4
void LLFloaterEditWater::selectWaterPreset(const std::string& strWaterPreset)
{
if (!isNewPreset())
{
if (/*const*/ LLScrollListItem* pItem = mWaterPresetCombo->getListControl()->getItemByLabel(strWaterPreset))
{
S32 idxItem = mWaterPresetCombo->getListControl()->getItemIndex(pItem);
mWaterPresetCombo->selectNthItem(idxItem);
mWaterPresetCombo->onCommit();
}
}