From 7313400a177a0f6991b12ad5ba2fb4ca098c3951 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 20 Nov 2016 02:57:46 +0100 Subject: [PATCH] FIRE-20386: Prevent adding duplicate controls to quickprefs --- indra/newview/quickprefs.cpp | 7 +++++++ indra/newview/skins/default/xui/de/notifications.xml | 4 ++++ indra/newview/skins/default/xui/en/notifications.xml | 11 +++++++++++ 3 files changed, 22 insertions(+) diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index 39a640f6c4..785dae3366 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -1575,6 +1575,13 @@ void FloaterQuickPrefs::onValuesChanged() // if we changed the control's variable, rebuild the user interface if (!new_control_name.empty() && old_control_name != new_control_name) { + if (mControlsList.find(new_control_name) != mControlsList.end()) + { + LL_WARNS() << "Selected control has already been added" << LL_ENDL; + LLNotificationsUtil::add("QuickPrefsDuplicateControl"); + return; + } + // remember the old control parameters so we can restore them later ControlEntry old_parameters = mControlsList[mSelectedControl]; // disable selection so the border doesn't cause a crash diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 6d03b0728d..9f533e8a68 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -5068,6 +5068,10 @@ Diese Aktion setzt die Schnelleinstellungen direkt auf die Standardkonfiguration Diese Aktion kann nicht rückgängig gemacht werden. + + Einstellung wurde bereits hinzugefügt. Bitte eine andere Einstellung wählen. + + Export nach [FILENAME] beendet. diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 560e6ff60c..2aa68c123d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -12543,6 +12543,17 @@ You cannot undo this action. notext="Cancel" yestext="OK"/> + + + fail +Setting has already been added. Please select a different one. + +