diff options
author | Neil <nyamatongwe@gmail.com> | 2018-10-11 09:29:05 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-10-11 09:29:05 +1100 |
commit | 083b30ff1783f7b6c803d2c5489ddcd5d0dce14f (patch) | |
tree | d28d0b4042348afcde28455406ca3cb69d11ab12 /qt/ScintillaEditBase/ScintillaQt.cpp | |
parent | 00f3a3ba52bb03872758a300719622161b469faa (diff) | |
download | scintilla-mirror-083b30ff1783f7b6c803d2c5489ddcd5d0dce14f.tar.gz |
Backport: Add SCI_SETCOMMANDEVENTS API to allow turning off command events.
This can reduce the time taken to fold a document by half.
Backport of changeset 7110:09c647755bed.
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaQt.cpp')
-rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp index cf4709a0e..8aebb9521 100644 --- a/qt/ScintillaEditBase/ScintillaQt.cpp +++ b/qt/ScintillaEditBase/ScintillaQt.cpp @@ -380,10 +380,12 @@ void ScintillaQt::NotifyChange() void ScintillaQt::NotifyFocus(bool focus) { - emit command( - Platform::LongFromTwoShorts - (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), - reinterpret_cast<sptr_t>(wMain.GetID())); + if (commandEvents) { + emit command( + Platform::LongFromTwoShorts + (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), + reinterpret_cast<sptr_t>(wMain.GetID())); + } Editor::NotifyFocus(focus); } |