summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatereditextdaycycle.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-04-30 18:39:11 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-04-30 18:39:11 +0300
commitbfc3d61d594f30c2b9913c7fb44b613678ec8e3d (patch)
tree8fa80a8735ccb06c5ce06a3322762c10b5401274 /indra/newview/llfloatereditextdaycycle.cpp
parent29f8e04ddba3b36776b295949d03ac44d6cb3b11 (diff)
SL-11066 [EEP] Editor shows the 98% keyframe settings while the 0% keyframe is selected
Diffstat (limited to 'indra/newview/llfloatereditextdaycycle.cpp')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 3846dfd2a4..bae901bd50 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1019,6 +1019,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderMouseDown(S32 x, S32 y, MASK mask)
void LLFloaterEditExtDayCycle::onFrameSliderMouseUp(S32 x, S32 y, MASK mask)
{
+ // Only happens when clicking on empty space of frameslider, not on specific frame
F32 sliderpos = mFramesSlider->getSliderValueFromPos(x, y);
mTimeSlider->setCurSliderValue(sliderpos);
@@ -1524,7 +1525,7 @@ void LLFloaterEditExtDayCycle::updateEditEnvironment(void)
void LLFloaterEditExtDayCycle::synchronizeTabs()
{
// This should probably get moved into "updateTabs"
- LLSettingsBase::TrackPosition frame(mTimeSlider->getCurSliderValue());
+ std::string curslider = mFramesSlider->getCurSlider();
bool canedit(false);
LLSettingsWater::ptr_t psettingW;
@@ -1535,12 +1536,15 @@ void LLFloaterEditExtDayCycle::synchronizeTabs()
{
canedit = false;
}
- else if (!mFramesSlider->getCurSlider().empty())
+ else if (!curslider.empty())
{
canedit = !mIsPlaying;
// either search mEditDay or retrieve from mSliderKeyMap
- LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, LLSettingsDay::TRACK_WATER, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR);
- psettingW = std::static_pointer_cast<LLSettingsWater>(found.second);
+ keymap_t::iterator slider_it = mSliderKeyMap.find(curslider);
+ if (slider_it != mSliderKeyMap.end())
+ {
+ psettingW = std::static_pointer_cast<LLSettingsWater>(slider_it->second.pSettings);
+ }
}
mCurrentEdit = psettingW;
if (!psettingW)
@@ -1568,12 +1572,15 @@ void LLFloaterEditExtDayCycle::synchronizeTabs()
{
canedit = false;
}
- else if (!mFramesSlider->getCurSlider().empty())
+ else if (!curslider.empty())
{
canedit = !mIsPlaying;
// either search mEditDay or retrieve from mSliderKeyMap
- LLSettingsDay::CycleTrack_t::value_type found = mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR);
- psettingS = std::static_pointer_cast<LLSettingsSky>(found.second);
+ keymap_t::iterator slider_it = mSliderKeyMap.find(curslider);
+ if (slider_it != mSliderKeyMap.end())
+ {
+ psettingS = std::static_pointer_cast<LLSettingsSky>(slider_it->second.pSettings);
+ }
}
mCurrentEdit = psettingS;
if (!psettingS)