From 64e45b5b6ef8ded7bbea1b376e5bf2cbb0d6f5a4 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 4 Jan 2019 17:10:28 -0800 Subject: SL-10041, SL-9758: Environment tab is disabled(shows can't do this) when EM does not allow parcel override. "Commit" button now reads "Apply to Parcel" or "Apply to Region" as needed. --- indra/newview/llfloatereditextdaycycle.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llfloatereditextdaycycle.cpp') diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 41582ffcc3..cb6fd611ec 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -113,6 +113,9 @@ namespace { const std::string ACTION_APPLY_REGION("apply_region"); const F32 DAY_CYCLE_PLAY_TIME_SECONDS = 60; + + const std::string STR_COMMIT_PARCEL("commit_parcel"); + const std::string STR_COMMIT_REGION("commit_region"); } //========================================================================= @@ -440,6 +443,17 @@ void LLFloaterEditExtDayCycle::refresh() bool show_commit = ((mEditContext == CONTEXT_PARCEL) || (mEditContext == CONTEXT_REGION)); bool show_apply = (mEditContext == CONTEXT_INVENTORY); + if (show_commit) + { + std::string commit_text; + if (mEditContext == CONTEXT_PARCEL) + commit_text = getString(STR_COMMIT_PARCEL); + else + commit_text = getString(STR_COMMIT_REGION); + + mFlyoutControl->setMenuItemLabel(ACTION_COMMIT, commit_text); + } + mFlyoutControl->setMenuItemVisible(ACTION_COMMIT, show_commit); mFlyoutControl->setMenuItemVisible(ACTION_SAVE, is_inventory_avail); mFlyoutControl->setMenuItemVisible(ACTION_SAVEAS, is_inventory_avail); -- cgit v1.2.3