summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-11-26 13:53:42 +0200
committerJustin Luth <jluth@mail.com>2021-11-26 18:13:06 +0100
commitbed6b7356e4bba1604ee5f760c80acc16ae54bae (patch)
tree74c2640211bc53ddd073c8633273230c27d74830 /sc/source
parent8d436e68a6f4d81a98a2059bc185ed86197272c4 (diff)
tdf#126356 partial Revert "sc tiled editing: Mapping has to be
turned off after drawing the buttons." This partially reverts LO 5.0 commit 342d84218c17da40d0a4f96bc3b07b536d64517a which comments: Also - we are actually never call with something else than MAP_PIXEL, so let's kill the resetting of the mapmode; let's see if some obscure corner case bites us here. Several bug reports have indicated artifacts on screen, all coming from the use of autofilter, and in these cases the map mode is 0 (Map100thMM), so I restored the whimsically removed logic. Change-Id: I9bb5d7418fc4083ed71139a64329b11fa1e4cc13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125879 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 4b0bcc449f5b..f504b6c75089 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -89,6 +89,11 @@ void ScDPFieldButton::setPopupLeft(bool b)
void ScDPFieldButton::draw()
{
+ bool bOldMapEnabled = mpOutDev->IsMapModeEnabled();
+
+ if (mpOutDev->GetMapMode().GetMapUnit() != MapUnit::MapPixel)
+ mpOutDev->EnableMapMode(false);
+
if (mbBaseButton)
{
// Background
@@ -135,6 +140,8 @@ void ScDPFieldButton::draw()
if (mbPopupButton)
drawPopupButton();
+
+ mpOutDev->EnableMapMode(bOldMapEnabled);
}
void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const