diff options
author | Rider Linden <rider@lindenlab.com> | 2018-09-13 16:31:36 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-09-13 16:31:36 +0000 |
commit | 079f5f6da9d7ad92add9d5b1111a4f0be52f32c9 (patch) | |
tree | 1e6c040b7a43a9114f07a357e751e4ca06a2b70a /indra/newview | |
parent | 3af4837032245403f0c37fe300834fab751e320a (diff) | |
parent | bb52cdf4f0104cb61c537041fc9574167fdf98eb (diff) |
Merged in andreykproductengine/maint-eep2 (pull request #82)
SL-1168 and SL-1307
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 4 |
2 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 855dda38cb..5bf34455bb 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -556,6 +556,12 @@ void LLFloaterEditExtDayCycle::onAddTrack() LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame too close to existing frame." << LL_ENDL; return; } + if (!mFramesSlider->canAddSliders()) + { + // Shouldn't happen, button should be disabled + LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame when slider is full." << LL_ENDL; + return; + } if (mCurrentTrack == LLSettingsDay::TRACK_WATER) { @@ -908,7 +914,7 @@ void LLFloaterEditExtDayCycle::updateButtons() //bool can_add = static_cast<bool>(settings); //mAddFrameButton->setEnabled(can_add); //mDeleteFrameButton->setEnabled(!can_add); - mAddFrameButton->setEnabled(true && mCanMod); + mAddFrameButton->setEnabled(mCanMod && mFramesSlider->canAddSliders()); mDeleteFrameButton->setEnabled(isRemovingFrameAllowed() && mCanMod); } @@ -969,13 +975,16 @@ void LLFloaterEditExtDayCycle::addSliderFrame(const F32 frame, LLSettingsBase::p // multi slider distinguishes elements by key/name in string format // store names to map to be able to recall dependencies std::string new_slider = mFramesSlider->addSlider(frame); - mSliderKeyMap[new_slider] = FrameData(frame, setting); - - if (update_ui) + if (!new_slider.empty()) { - mLastFrameSlider = new_slider; - mTimeSlider->setCurSliderValue(frame); - updateTabs(); + mSliderKeyMap[new_slider] = FrameData(frame, setting); + + if (update_ui) + { + mLastFrameSlider = new_slider; + mTimeSlider->setCurSliderValue(frame); + updateTabs(); + } } } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index d263e15a10..3ad78efd41 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -659,6 +659,10 @@ LLParcel * LLViewerParcelMgr::getAgentOrSelectedParcel() const if (selection) { parcel = selection->getParcel(); + if (parcel->getLocalID() == INVALID_PARCEL_ID) + { + parcel = NULL; + } } } |