tdf#148660 - Reset auto-filter button to its default state

The button was only constructed to actually test that the mouse cursor
clicked on the popup arrow box. If this was not the case, reset the
auto-filter button to its default state. Otherwise,
RefreshAutoFilterButton() draws a grey box over the entire cell after
the popup will be closed.

Change-Id: I07ea38affed52a6ae5a9ac3d19fcdd2a22941816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210978
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
This commit is contained in:
DrRobotto
2026-09-15 08:59:07 +02:00
committed by Andreas Heinisch
parent e2e3bc9928
commit 65f0289e20
+7
View File
@@ -136,7 +136,12 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
if (aRect.Contains(rMEvt.GetPosPixel()))
{
if ( DoPageFieldSelection( nCol, nRow ) )
{
// tdf#148660 - reset filter button to its default state
mpFilterButton.reset();
return true;
}
bool bFilterActive = IsAutoFilterActive(nCol, nRow, nTab);
mpFilterButton->setHasHiddenMember(bFilterActive);
@@ -148,6 +153,8 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent&
return true;
}
// tdf#148660 - reset filter button to its default state
mpFilterButton.reset();
return false;
}