[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 3 14:20:08 UTC 2021
dbaccess/source/ui/control/sqledit.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 5b98dd53c7dc101d3a5ff693d3f0520ec1abd3d1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 3 12:28:23 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Aug 3 16:19:32 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 now deferred until the timer fires, so reduce
the timer to make it smoother
Change-Id: I27980be54de20bb516b1f106c3ed1b303e2a4014
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119933
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index a3a8626acc21..0be854655593 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -127,7 +127,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();
@@ -171,8 +171,6 @@ IMPL_LINK_NOARG(SQLEditView, ModifyHdl, LinkParamNone*, void)
{
if (m_bInUpdate)
return;
-
- m_aModifyLink.Call(nullptr);
m_aUpdateDataTimer.Start();
}
@@ -195,7 +193,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 ) );
@@ -215,12 +212,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();
}
More information about the Libreoffice-commits
mailing list