From d60588ec4fe6adc67de7938bc8ed9570f6cb187c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 5 Oct 2018 17:12:58 +0300 Subject: SL-9822 Minimizing viewer resets day editor's values --- indra/newview/llfloatereditextdaycycle.h | 3 +++ indra/newview/llpanelenvironment.cpp | 7 ++++++- indra/newview/llpanelenvironment.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h index 0f2c572ccf..fd5fb67837 100644 --- a/indra/newview/llfloatereditextdaycycle.h +++ b/indra/newview/llfloatereditextdaycycle.h @@ -89,6 +89,9 @@ public: void setEditDayCycle(const LLSettingsDay::ptr_t &pday); void setEditDefaultDayCycle(); + LLUUID getEditingAssetId() { return mEditDay ? mEditDay->getAssetId() : LLUUID::null; } + LLUUID getEditingInventoryId() { return mInventoryId; } + BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 1c12677355..ee66c5c15b 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -116,6 +116,7 @@ const std::string alt_labels[] = { LLPanelEnvironmentInfo::LLPanelEnvironmentInfo(): mCurrentEnvironment(), mDirtyFlag(0), + mEditorLastParcelId(INVALID_PARCEL_ID), mCrossRegion(false), mNoSelection(false), mNoEnvironment(false), @@ -325,11 +326,15 @@ void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentI else dayeditor->closeFloater(); } - else + else if (dayeditor->getEditingAssetId() != nextenv->mDayCycle->getAssetId() + || mEditorLastParcelId != nextenv->mParcelId + || mEditorLastRegionId != nextenv->mRegionId) { // Ignore dirty // If parcel selection changed whatever we do except saving to inventory with // old settings will be invalid. + mEditorLastParcelId = nextenv->mParcelId; + mEditorLastRegionId = nextenv->mRegionId; dayeditor->setEditDayCycle(nextenv->mDayCycle); } } diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 01b9b9c562..3ed631db41 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -171,6 +171,8 @@ private: LLHandle mSettingsFloater; LLHandle mEditFloater; S32 mDirtyFlag; + S32 mEditorLastParcelId; + LLUUID mEditorLastRegionId; bool mCrossRegion; bool mNoSelection; bool mNoEnvironment; -- cgit v1.2.3