mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Stopped the Label class editing when clicked if it's disabled.
This commit is contained in:
parent
4bf5e235ba
commit
c8affe81a6
1 changed files with 7 additions and 2 deletions
|
|
@ -324,6 +324,7 @@ void Label::paint (Graphics& g)
|
|||
void Label::mouseUp (const MouseEvent& e)
|
||||
{
|
||||
if (editSingleClick
|
||||
&& isEnabled()
|
||||
&& e.mouseWasClicked()
|
||||
&& contains (e.getPosition())
|
||||
&& ! e.mods.isPopupMenu())
|
||||
|
|
@ -334,7 +335,9 @@ void Label::mouseUp (const MouseEvent& e)
|
|||
|
||||
void Label::mouseDoubleClick (const MouseEvent& e)
|
||||
{
|
||||
if (editDoubleClick && ! e.mods.isPopupMenu())
|
||||
if (editDoubleClick
|
||||
&& isEnabled()
|
||||
&& ! e.mods.isPopupMenu())
|
||||
showEditor();
|
||||
}
|
||||
|
||||
|
|
@ -346,7 +349,9 @@ void Label::resized()
|
|||
|
||||
void Label::focusGained (FocusChangeType cause)
|
||||
{
|
||||
if (editSingleClick && cause == focusChangedByTabKey)
|
||||
if (editSingleClick
|
||||
&& isEnabled()
|
||||
&& cause == focusChangedByTabKey)
|
||||
showEditor();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue