dbaccess/source/ui/control/sqledit.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit ac5d22c15f2e374b4458145abfd458e58b2f2e77 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Aug 3 12:28:23 2021 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Aug 3 17:22:17 2021 +0200 tdf#143657 'execute' button doesn't get enabled when contents changed since... commit 73c9ef661d9ef6237d3fd3c259fd040a545b44cf Date: Tue Jul 6 18:51:38 2021 +0200 tdf#132740 don't broadcast if modified status has not changed now we only get a notification on transition from unmodified to modified. So continue to launch a timer on transition but clear modification on firing so we will get notified on the next change and move the modify callback to the timer. modifications are no deferred until the timer fires, so reduce the timer to make it smoother Change-Id: I27980be54de20bb516b1f106c3ed1b303e2a4014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119863 Tested-by: Jenkins Reviewed-by: Julien Nabet <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index c53f684dab4a..18eac53dee60 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -126,7 +126,7 @@ void SQLEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) rEditEngine.SetDefaultHorizontalTextDirection(EEHorizontalTextDirection::L2R); rEditEngine.SetModifyHdl(LINK(this, SQLEditView, ModifyHdl)); - m_aUpdateDataTimer.SetTimeout(300); + m_aUpdateDataTimer.SetTimeout(150); m_aUpdateDataTimer.SetInvokeHandler(LINK(this, SQLEditView, ImplUpdateDataHdl)); ImplSetFont(); @@ -170,8 +170,6 @@ IMPL_LINK_NOARG(SQLEditView, ModifyHdl, LinkParamNone*, void) { if (m_bInUpdate) return; - - m_aModifyLink.Call(nullptr); m_aUpdateDataTimer.Start(); } @@ -194,7 +192,6 @@ void SQLEditView::UpdateData() rEditEngine.EnableUndo(false); // syntax highlighting - bool bOrigModified = rEditEngine.IsModified(); for (sal_Int32 nLine=0; nLine < rEditEngine.GetParagraphCount(); ++nLine) { OUString aLine( rEditEngine.GetText( nLine ) ); @@ -214,12 +211,15 @@ void SQLEditView::UpdateData() rEditEngine.QuickSetAttribs(aSet, ESelection(nLine, portion.nBegin, nLine, portion.nEnd)); } } - if (!bOrigModified) - rEditEngine.ClearModifyFlag(); + + rEditEngine.ClearModifyFlag(); + m_bInUpdate = false; rEditEngine.EnableUndo(bUndoEnabled); + m_aModifyLink.Call(nullptr); + Invalidate(); }
