svx/source/svdraw/sdrpaintwindow.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fafa2a75c02611079d8bb11d230c606026427beb
Author:     Justin Luth <[email protected]>
AuthorDate: Mon Nov 24 20:41:35 2025 -0500
Commit:     Justin Luth <[email protected]>
CommitDate: Fri Dec 5 22:34:39 2025 +0100

    tdf#169713 svx: paint from last to first, not first to last
    
    In my example document, there were two vcl checkboxes
    stacked on top of each other. One was ticked, and the other wasn't.
    If I scrolled the document, then un-ticked was painted,
    but if I clicked nearby, it was painted as ticked.
    
    I don't know why this was implemented in two opposite ways.
    I changed it to match how vcl PaintHelper::~PaintHelper does it.
    
    From my code-reading, it sounds like the highest heaven is FirstChild
    so that would be the last thing painted (over top of everything else).
    Thus I think PaintHelper is the accurate code.
    
    Change-Id: I0a41bd883977ff6a4f26f260f015545f84028247
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194729
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>

diff --git a/svx/source/svdraw/sdrpaintwindow.cxx 
b/svx/source/svdraw/sdrpaintwindow.cxx
index 5f3f65fe38e3..8ad724c3793f 100644
--- a/svx/source/svdraw/sdrpaintwindow.cxx
+++ b/svx/source/svdraw/sdrpaintwindow.cxx
@@ -79,7 +79,7 @@ void PaintTransparentChildren(vcl::Window const & rWindow, 
tools::Rectangle cons
 
 void CandidateMgr::PaintTransparentChildren(vcl::Window const & rWindow, 
tools::Rectangle const& rPixelRect)
 {
-    vcl::Window * pCandidate = rWindow.GetWindow( GetWindowType::FirstChild );
+    vcl::Window * pCandidate = rWindow.GetWindow( GetWindowType::LastChild );
     while (pCandidate)
     {
         if (pCandidate->IsPaintTransparent())
@@ -94,7 +94,7 @@ void CandidateMgr::PaintTransparentChildren(vcl::Window const 
& rWindow, tools::
                 pCandidate->AddEventListener(LINK(this, CandidateMgr, 
WindowEventListener));
             }
         }
-        pCandidate = pCandidate->GetWindow( GetWindowType::Next );
+        pCandidate = pCandidate->GetWindow( GetWindowType::Prev );
     }
 
     for (const auto& rpCandidate : m_aCandidates)

Reply via email to