summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatereditextdaycycle.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-04 17:10:28 -0800
committerRider Linden <rider@lindenlab.com>2019-01-04 17:10:28 -0800
commit64e45b5b6ef8ded7bbea1b376e5bf2cbb0d6f5a4 (patch)
tree1d2334529f952a303188856794feb765749290b6 /indra/newview/llfloatereditextdaycycle.cpp
parente9a2e8f88c67685ea6b894e8a4ae289067d0bfb7 (diff)
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.
Diffstat (limited to 'indra/newview/llfloatereditextdaycycle.cpp')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
1 files changed, 14 insertions, 0 deletions
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);