summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-06-03 12:23:29 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-06-03 12:23:29 +0300
commitafb08192247138b8e8d86671a6dc001e041d1c82 (patch)
treeafcd4e513e550faae1197a321142b597174da444
parent1491c23d9b7850d91518b689572716026c0bacc8 (diff)
MAINT-1788 FIXED Cancel changes when clicking Close button or exiting Viewer.
-rwxr-xr-xindra/newview/llfloaterjoystick.cpp14
-rwxr-xr-xindra/newview/llfloaterjoystick.h5
-rwxr-xr-xindra/newview/llfloaterpreference.cpp12
-rwxr-xr-xindra/newview/llfloaterpreference.h1
4 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index b7fff6cae3..ee3d633dd0 100755
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -326,7 +326,21 @@ void LLFloaterJoystick::onClickOK(void *joy_panel)
}
}
+void LLFloaterJoystick::onClickCloseBtn(bool app_quitting)
+{
+ cancel();
+ closeFloater(app_quitting);
+}
+
void LLFloaterJoystick::setSNDefaults()
{
LLViewerJoystick::getInstance()->setSNDefaults();
}
+
+void LLFloaterJoystick::onClose(bool app_quitting)
+{
+ if (app_quitting)
+ {
+ cancel();
+ }
+}
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index 9c3752540d..a1b5951389 100755
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -45,6 +45,11 @@ public:
virtual void draw();
static void setSNDefaults();
+protected:
+
+ void onClose(bool app_quitting);
+ void onClickCloseBtn(bool app_quitting);
+
private:
LLFloaterJoystick(const LLSD& data);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index ee4396758e..4db1a83396 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2235,6 +2235,11 @@ void LLFloaterPreferenceProxy::onOpen(const LLSD& key)
void LLFloaterPreferenceProxy::onClose(bool app_quitting)
{
+ if(app_quitting)
+ {
+ cancel();
+ }
+
if (mSocksSettingsDirty)
{
@@ -2334,6 +2339,11 @@ void LLFloaterPreferenceProxy::onBtnCancel()
cancel();
}
+void LLFloaterPreferenceProxy::onClickCloseBtn(bool app_quitting)
+{
+ cancel();
+}
+
void LLFloaterPreferenceProxy::cancel()
{
@@ -2344,7 +2354,7 @@ void LLFloaterPreferenceProxy::cancel()
LLSD ctrl_value = iter->second;
control->set(ctrl_value);
}
-
+ mSocksSettingsDirty = false;
closeFloater();
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 7bf6ae7d79..b3878457e2 100755
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -269,6 +269,7 @@ protected:
void saveSettings();
void onBtnOk();
void onBtnCancel();
+ void onClickCloseBtn(bool app_quitting = false);
void onChangeSocksSettings();