sc/source/ui/docshell/dbdocfun.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit fde2dbee185250e13707630bfa1a72226857f97f
Author:     Markus Mohrhard <[email protected]>
AuthorDate: Thu Aug 7 03:44:41 2025 +0800
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Nov 17 18:59:44 2025 +0100

    fix the displaying of filter buttons after modifying the DB data
    
    Change-Id: I63c09551ab04bfec9beb20a35db7fc41d7168700
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193668
    Tested-by: Andras Timar <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/sc/source/ui/docshell/dbdocfun.cxx 
b/sc/source/ui/docshell/dbdocfun.cxx
index 6c22458f3a63..3b09e63ad4b8 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -238,8 +238,9 @@ void ScDBDocFunc::ModifyDBData( const ScDBData& rNewData )
         pUndoColl.reset( new ScDBCollection( *pDocColl ) );
 
     *pData = rNewData;
-    if (bAreaChanged) {
-        rDoc.CompileDBFormula();
+    if (bAreaChanged || bOldAutoFilter != bNewAutoFilter) {
+        if (bAreaChanged)
+            rDoc.CompileDBFormula();
         if (bOldAutoFilter && !bNewAutoFilter)
         {
             rDoc.RemoveFlagsTab(aOldRange.aStart.Col(), 
aOldRange.aStart.Row(), aOldRange.aEnd.Col(), aOldRange.aEnd.Row(), 
aOldRange.aStart.Tab(), ScMF::Auto);
@@ -253,9 +254,11 @@ void ScDBDocFunc::ModifyDBData( const ScDBData& rNewData )
         {
             rDoc.ApplyFlagsTab(aNewRange.aStart.Col(), aNewRange.aStart.Row(), 
aNewRange.aEnd.Col(), aNewRange.aStart.Row(), aNewRange.aStart.Tab(), 
ScMF::Auto);
         }
-        rDocShell.PostPaint(aOldRange, PaintPartFlags::Grid);
+
     }
 
+    rDocShell.PostPaint(aOldRange, PaintPartFlags::Grid);
+
     if (bUndo)
     {
         rDocShell.GetUndoManager()->AddUndoAction(

Reply via email to