diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 7 | ||||
-rw-r--r-- | indra/newview/lltrackpicker.cpp | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml | 1 |
3 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 18f22bf2d2..f712901795 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1322,6 +1322,11 @@ void LLFloaterEditExtDayCycle::updateSlider() mFramesSlider->clear(); mSliderKeyMap.clear(); + if (!mEditDay) + { + return; + } + LLSettingsDay::CycleTrack_t track = mEditDay->getCycleTrack(mCurrentTrack); for (auto &track_frame : track) { @@ -1723,7 +1728,7 @@ bool LLFloaterEditExtDayCycle::isRemovingFrameAllowed() bool LLFloaterEditExtDayCycle::isAddingFrameAllowed() { - if (!mFramesSlider->getCurSlider().empty()) return false; + if (!mFramesSlider->getCurSlider().empty() || !mEditDay) return false; LLSettingsBase::Seconds frame(mTimeSlider->getCurSliderValue()); if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second) diff --git a/indra/newview/lltrackpicker.cpp b/indra/newview/lltrackpicker.cpp index bc918f4bd7..15bc591b37 100644 --- a/indra/newview/lltrackpicker.cpp +++ b/indra/newview/lltrackpicker.cpp @@ -81,13 +81,21 @@ void LLFloaterTrackPicker::showPicker(const LLSD &args) LLSD::array_const_iterator iter; LLSD::array_const_iterator end = args.endArray(); + bool select_item = true; for (iter = args.beginArray(); iter != end; ++iter) { S32 track_id = (*iter)["id"].asInteger(); bool can_enable = (*iter)["enabled"].asBoolean(); - LLView *view = getChild<LLCheckBoxCtrl>(RDO_TRACK_PREFIX + llformat("%d", track_id), true); + LLCheckBoxCtrl *view = getChild<LLCheckBoxCtrl>(RDO_TRACK_PREFIX + llformat("%d", track_id), true); view->setEnabled(can_enable); view->setLabelArg("[ALT]", (*iter).has("altitude") ? ((*iter)["altitude"].asString() + "m") : " "); + + // Mark first avaliable item as selected + if (can_enable && select_item) + { + select_item = false; + view->set(TRUE); + } } openFloater(getKey()); diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml index 284b30da6c..1b5bd90748 100644 --- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml +++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml @@ -255,6 +255,7 @@ max_val="1" name="WLDayCycleFrames" show_text="false" + thumb_highlight_color="white" thumb_width="12" top_pad="15" width="525" /> |