diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-09-19 19:18:55 +0300 | 
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-09-19 19:18:55 +0300 | 
| commit | 9353022c5a06d4dc868b4231f41c1bb9aaf1ed3e (patch) | |
| tree | f4126ed06076931597a6310faf8800620049f88e | |
| parent | 4048e28b910d9d40534feecf431539ee4c4aace6 (diff) | |
SL-9707 EEP Make behavior more consistent for applying inventory
| -rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 20 | 
2 files changed, 34 insertions, 4 deletions
| diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index fa16648140..3531e9c4e8 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1260,11 +1260,25 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons              return;          } -        LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1); +        if (mInventoryItem && !isDirty()) +        { +            LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1); +        } +        else +        { +            LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1); +        }      }      else if (where == ACTION_APPLY_REGION)      { -        LLEnvironment::instance().updateRegion(day, -1, -1); +        if (mInventoryItem && !isDirty()) +        { +            LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1); +        } +        else +        { +            LLEnvironment::instance().updateRegion(day, -1, -1); +        }      }      else      { diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index d65a578a6d..2eda405f51 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -430,17 +430,33 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)              return;          } -        if (mSettings->getSettingsType() == "sky") +        if (mInventoryItem && !isDirty()) +        { +            LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1); +        } +        else if (mSettings->getSettingsType() == "sky") +        {              LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsSky>(mSettings), -1, -1); +        }          else if (mSettings->getSettingsType() == "water") +        {              LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsWater>(mSettings), -1, -1); +        }      }      else if (where == ACTION_APPLY_REGION)      { -        if (mSettings->getSettingsType() == "sky") +        if (mInventoryItem && !isDirty()) +        { +            LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1); +        } +        else if (mSettings->getSettingsType() == "sky") +        {              LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsSky>(mSettings), -1, -1); +        }          else if (mSettings->getSettingsType() == "water") +        {              LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsWater>(mSettings), -1, -1); +        }      }      else      { | 
