[Libreoffice-commits] core.git: vcl/source

Noel Grandin noel at peralex.com
Thu Oct 8 02:03:23 PDT 2015


 vcl/source/window/event.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 1d0839fb98b8ec672e22b21867297317c8a961ee
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Oct 8 10:51:19 2015 +0200

    fix for tdf#94827 - ToolBox events aren't delivered
    
    regression from 1e67e94f1a308ca60d4934e9fe9d5c048225ebe8
    "convert Link<> to typed"
    
    Change-Id: Ibb20366f0edcb9425d61ce5e9d5fb1a34533785b

diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index ac950d6..548e870 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -238,16 +238,17 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
         if ( aDelData.IsDead() )
             return;
 
-        if (!mpWindowImpl->maEventListeners.empty())
+        auto& rChildListeners = pWindow->mpWindowImpl->maChildEventListeners;
+        if (!rChildListeners.empty())
         {
             // Copy the list, because this can be destroyed when calling a Link...
-            std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maChildEventListeners );
+            std::vector<Link<VclWindowEvent&,void>> aCopy( rChildListeners );
             for ( Link<VclWindowEvent&,void>& rLink : aCopy )
             {
                 if (aDelData.IsDead())
                     return;
                 // check this hasn't been removed in some re-enterancy scenario fdo#47368
-                if( std::find(mpWindowImpl->maChildEventListeners.begin(), mpWindowImpl->maChildEventListeners.end(), rLink) != mpWindowImpl->maChildEventListeners.end() )
+                if( std::find(rChildListeners.begin(), rChildListeners.end(), rLink) != rChildListeners.end() )
                     rLink.Call( aEvent );
             }
         }


More information about the Libreoffice-commits mailing list