diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-03 12:28:23 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-09 09:40:40 +0200 |
commit | 508d9f5d9c33855735820ce272c6eee9f8dda09e (patch) | |
tree | a19af36a2c62f44b8d2f571e8ccd0c27c0876abb | |
parent | 4eb6435933bd399bec1d2240719b33a3aa40c550 (diff) |
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/+/119864
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | dbaccess/source/ui/control/sqledit.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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(); } |