mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
TextEditor: Avoid starting timer unnecessarily when setting text
This commit is contained in:
parent
240089bcbc
commit
46d24cc1ab
1 changed files with 4 additions and 1 deletions
|
|
@ -1328,7 +1328,10 @@ void TextEditor::moveCaret (int newCaretPos)
|
|||
if (newCaretPos != getCaretPosition())
|
||||
{
|
||||
caretPosition = newCaretPos;
|
||||
textHolder->restartTimer();
|
||||
|
||||
if (hasKeyboardFocus (false))
|
||||
textHolder->restartTimer();
|
||||
|
||||
scrollToMakeSureCursorIsVisible();
|
||||
updateCaretPosition();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue