From a59170df0e7f0f431057938571eae589693d21f6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 1 Aug 2018 20:27:47 +0300 Subject: MAINT-8905 EEP - tracks should show altitudes --- indra/newview/llfloatereditextdaycycle.cpp | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloatereditextdaycycle.cpp') diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 554757840f..daf0c931fa 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -191,19 +191,21 @@ BOOL LLFloaterEditExtDayCycle::postBuild() void LLFloaterEditExtDayCycle::onOpen(const LLSD& key) { mEditDay.reset(); + + LLEnvironment::EnvSelection_t env = LLEnvironment::ENV_DEFAULT; if (key.has(KEY_INVENTORY_ID)) { loadInventoryItem(key[KEY_INVENTORY_ID].asUUID()); } else if (key.has(KEY_LIVE_ENVIRONMENT)) { - LLEnvironment::EnvSelection_t env = static_cast(key[KEY_LIVE_ENVIRONMENT].asInteger()); + env = static_cast(key[KEY_LIVE_ENVIRONMENT].asInteger()); loadLiveEnvironment(env); } else { - loadLiveEnvironment(LLEnvironment::ENV_DEFAULT); + loadLiveEnvironment(env); } mDayLength.value(0); @@ -212,7 +214,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key) mDayLength.value(key[KEY_DAY_LENGTH].asReal()); } - // time labels + // Time&Percentage labels mCurrentTimeLabel->setTextArg("[PRCNT]", std::string("0")); const S32 max_elm = 5; if (mDayLength.value() != 0) @@ -246,15 +248,28 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key) mCurrentTimeLabel->setTextArg("[DSC]", std::string()); } + // Altitudes&Track labels + LLUIString formatted_label = getString("sky_track_label"); const LLEnvironment::altitude_list_t &altitudes = LLEnvironment::instance().getRegionAltitudes(); + bool extended_env = LLEnvironment::instance().isExtendedEnvironmentEnabled(); + bool use_altitudes = extended_env + && altitudes.size() > 0 + && (env == LLEnvironment::ENV_REGION || env == LLEnvironment::ENV_PARCEL); for (S32 idx = 1; idx < 4; ++idx) { - std::stringstream label; - label << altitudes[idx] << "m"; - getChild(track_tabs[idx + 1], true)->setTextArg("[DSC]", label.str()); + std::ostringstream convert; + if (use_altitudes) + { + convert << altitudes[idx] << "m"; + } + else + { + convert << (idx + 1); + } + formatted_label.setArg("[ALT]", convert.str()); + getChild(track_tabs[idx + 1], true)->setLabel(formatted_label.getString()); } - bool extended_env = LLEnvironment::instance().isExtendedEnvironmentEnabled(); for (int i = 2; i < LLSettingsDay::TRACK_MAX; i++) //skies #2 through #4 { getChild(track_tabs[i])->setEnabled(extended_env); -- cgit v1.2.3 From a1fdb88299ffd0631008f6ee6994859831a82148 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 2 Aug 2018 19:58:05 +0300 Subject: MAINT-8945 EEP clicking near a keyframe may activate it without highlighting it green --- indra/newview/llfloatereditextdaycycle.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatereditextdaycycle.cpp') diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index daf0c931fa..cbdc026cfe 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -975,9 +975,13 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() LLTabContainer * tabs = mWaterTabLayoutContainer->getChild(TABS_WATER); if (mCurrentTrack == LLSettingsDay::TRACK_WATER) { - canedit = !mIsPlaying; - LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, LLSettingsDay::TRACK_WATER, FRAME_SLOP_FACTOR); - psettingW = std::static_pointer_cast(found.second); + if (!mFramesSlider->getCurSlider().empty()) + { + canedit = !mIsPlaying; + // either search mEditDay or retrieve from mSliderKeyMap + LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, LLSettingsDay::TRACK_WATER, FRAME_SLOP_FACTOR); + psettingW = std::static_pointer_cast(found.second); + } mCurrentEdit = psettingW; if (!psettingW) { @@ -999,9 +1003,13 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() tabs = mSkyTabLayoutContainer->getChild(TABS_SKYS); if (mCurrentTrack != LLSettingsDay::TRACK_WATER) { - canedit = !mIsPlaying; - LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, FRAME_SLOP_FACTOR); - psettingS = std::static_pointer_cast(found.second); + if (!mFramesSlider->getCurSlider().empty()) + { + canedit = !mIsPlaying; + // either search mEditDay or retrieve from mSliderKeyMap + LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, FRAME_SLOP_FACTOR); + psettingS = std::static_pointer_cast(found.second); + } mCurrentEdit = psettingS; if (!psettingS) { -- cgit v1.2.3