summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-09-26 16:45:20 +0000
committerRider Linden <rider@lindenlab.com>2018-09-26 16:45:20 +0000
commit2c25b7dcc37adacb51d30bbfc741ec0690156f5e (patch)
tree16adc0260f7fd7b0a4e0f3abe99e57d632e42c27
parent405f5c879c44f32635dcb94de2c7dfb9e4a8673a (diff)
parent41a6504c5e121f4ee35f06adc297485d21f4d14d (diff)
Merged in andreykproductengine/maint-eep2 (pull request #115)
SL-983 EEP - When selecting a new parcel with the day editor open follow in editor
-rw-r--r--indra/newview/llpanelenvironment.cpp13
-rw-r--r--indra/newview/llpanelenvironment.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index aa8c6cf724..20aaf258f8 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -232,6 +232,8 @@ void LLPanelEnvironmentInfo::refresh()
udpateApparentTimeOfDay();
+ updateEditFloater(mCurrentEnvironment, canEdit());
+
#if 1
// hiding the controls until Rider can get the simulator code to adjust altitudes done.
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(FALSE);
@@ -312,14 +314,14 @@ LLFloaterEditExtDayCycle * LLPanelEnvironmentInfo::getEditFloater(bool create)
}
-void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentInfo::ptr_t &nextenv)
+void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentInfo::ptr_t &nextenv, bool enable)
{
LLFloaterEditExtDayCycle *dayeditor(getEditFloater(false));
if (!dayeditor)
return;
- if (!nextenv || !nextenv->mDayCycle)
+ if (!nextenv || !nextenv->mDayCycle || !enable)
{
if (mCommitConnection.connected())
mCommitConnection.disconnect();
@@ -331,7 +333,10 @@ void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentI
}
else
{
- /*TODO: Swap in new day to edit?*/
+ // Ignore dirty
+ // If parcel selection changed whatever we do except saving to inventory with
+ // old settings will be invalid.
+ dayeditor->setEditDayCycle(nextenv->mDayCycle);
}
}
@@ -363,7 +368,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(true);
getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(FALSE);
- updateEditFloater(mCurrentEnvironment);
+ updateEditFloater(mCurrentEnvironment, false);
return false;
}
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 93fe186d6f..9bc0b9df9c 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -132,7 +132,7 @@ protected:
LLFloaterSettingsPicker * getSettingsPicker(bool create = true);
LLFloaterEditExtDayCycle * getEditFloater(bool create = true);
- void updateEditFloater(const LLEnvironment::EnvironmentInfo::ptr_t &nextenv);
+ void updateEditFloater(const LLEnvironment::EnvironmentInfo::ptr_t &nextenv, bool enable);
void setCrossRegion(bool val) { mCrossRegion = val; }
void setNoSelection(bool val) { mNoSelection = val; }