From e467d936452bd428fe71339803fa22eb0a5f31e2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 12 Nov 2021 10:05:34 +0000 Subject: Resolves: tdf#145582 modify called too often MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a problem since: commit 5b98dd53c7dc101d3a5ff693d3f0520ec1abd3d1 Date: Tue Aug 3 12:28:23 2021 +0100 tdf#143657 'execute' button doesn't get enabled when contents changed which was a fix for the problem since: commit 73c9ef661d9ef6237d3fd3c259fd040a545b44cf Date: Tue Jul 6 18:51:38 2021 +0200 tdf#132740 don't broadcast if modified status has not changed Change-Id: Ibae42251ce04229283283407bc2ab986272e945d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125090 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- dbaccess/source/ui/control/sqledit.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dbaccess/source') diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index a55664513e86..7f86d8d01bc0 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -195,6 +195,7 @@ void SQLEditView::UpdateData() m_bInUpdate = true; EditEngine& rEditEngine = *GetEditEngine(); + bool bModified = rEditEngine.IsModified(); bool bUndoEnabled = rEditEngine.IsUndoEnabled(); rEditEngine.EnableUndo(false); @@ -225,7 +226,8 @@ void SQLEditView::UpdateData() rEditEngine.EnableUndo(bUndoEnabled); - m_aModifyLink.Call(nullptr); + if (bModified) + m_aModifyLink.Call(nullptr); Invalidate(); } -- cgit