summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewgesture.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-01 21:34:44 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-01 21:34:44 +0300
commit4c889f7e5252d8c82b0ffc3e13af5bf5d32a6047 (patch)
tree7cd047318bfd924ee2381409841f01d9284aca46 /indra/newview/llpreviewgesture.cpp
parent6dbde938e2c72259e941b10fe0a96ba196c95de9 (diff)
parent167e45e309ebeaccb346b8ca05884b8e10bf05eb (diff)
Merge branch 'master' (DRTVWR-514) into DRTVWR-518-ui
# Conflicts: # indra/newview/skins/default/xui/en/menu_viewer.xml SL-12494 vs SL-15034
Diffstat (limited to 'indra/newview/llpreviewgesture.cpp')
-rw-r--r--indra/newview/llpreviewgesture.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 70ce275734..18c2fb5452 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -373,11 +373,11 @@ BOOL LLPreviewGesture::postBuild()
mReplaceEditor = edit;
combo = getChild<LLComboBox>( "modifier_combo");
- combo->setCommitCallback(onCommitSetDirty, this);
+ combo->setCommitCallback(boost::bind(&LLPreviewGesture::onCommitKeyorModifier, this));
mModifierCombo = combo;
combo = getChild<LLComboBox>( "key_combo");
- combo->setCommitCallback(onCommitSetDirty, this);
+ combo->setCommitCallback(boost::bind(&LLPreviewGesture::onCommitKeyorModifier, this));
mKeyCombo = combo;
list = getChild<LLScrollListCtrl>("library_list");
@@ -937,12 +937,16 @@ void LLPreviewGesture::loadUIFromGesture(LLMultiGesture* gesture)
break;
}
+ mModifierCombo->setEnabledByValue(CTRL_LABEL, gesture->mKey != KEY_F10);
+
mKeyCombo->setCurrentByIndex(0);
if (gesture->mKey != KEY_NONE)
{
mKeyCombo->setSimple(LLKeyboard::stringFromKey(gesture->mKey));
}
+ mKeyCombo->setEnabledByValue(LLKeyboard::stringFromKey(KEY_F10), gesture->mMask != MASK_CONTROL);
+
// Make UI steps for each gesture step
S32 i;
S32 count = gesture->mSteps.size();
@@ -1338,6 +1342,17 @@ LLMultiGesture* LLPreviewGesture::createGesture()
}
+void LLPreviewGesture::onCommitKeyorModifier()
+{
+ // SL-14139: ctrl-F10 is currently used to access top menu,
+ // so don't allow to bound gestures to this combination.
+
+ mKeyCombo->setEnabledByValue(LLKeyboard::stringFromKey(KEY_F10), mModifierCombo->getSimple() != CTRL_LABEL);
+ mModifierCombo->setEnabledByValue(CTRL_LABEL, mKeyCombo->getSimple() != LLKeyboard::stringFromKey(KEY_F10));
+ mDirty = TRUE;
+ refresh();
+}
+
// static
void LLPreviewGesture::updateLabel(LLScrollListItem* item)
{