From 2a613d7363c4e91a7258d4f0ea3971db1569e788 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 1 Jun 2018 16:24:36 -0700 Subject: Rework preset loading and context menu from inventory. --- indra/newview/llviewermenu.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ce1e740425..8153e41b45 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8391,26 +8391,22 @@ class LLWorldEnvSettings : public view_listener_t if (tod == "sunrise") { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunrise"); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNRISE); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); } else if (tod == "noon") { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midday"); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDDAY); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); } else if (tod == "sunset") { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunset"); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNSET); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); } else if (tod == "midnight") { - LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midnight"); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDNIGHT); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); } else -- cgit v1.2.3