From 12e99c715204fb7f3d6957ca258fd941dde1e3dd Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 23 Aug 2017 14:26:34 +0100 Subject: [PATCH] Allow select all key command for read-only TextEditors --- modules/juce_gui_basics/widgets/juce_TextEditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp index bb78a03dd4..133af341f7 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp @@ -1991,7 +1991,8 @@ void TextEditor::setEscapeAndReturnKeysConsumed (bool shouldBeConsumed) noexcept bool TextEditor::keyPressed (const KeyPress& key) { - if (isReadOnly() && key != KeyPress ('c', ModifierKeys::commandModifier, 0)) + if (isReadOnly() && key != KeyPress ('c', ModifierKeys::commandModifier, 0) + && key != KeyPress ('a', ModifierKeys::commandModifier, 0)) return false; if (! TextEditorKeyMapper::invokeKeyFunction (*this, key))