]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/scrolbar.cpp
applied patch 1373127
[wxWidgets.git] / src / univ / scrolbar.cpp
index 93fdb0ba402a665d7eef3daff76860c3664b9d54..d103fb90e76849e56c1f60121444bcbe9852754b 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "univscrolbar.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
@@ -554,12 +550,18 @@ bool wxScrollBar::PerformAction(const wxControlAction& action,
             // NB: we assume that scrollbar events are sequentially numbered
             //     but this should be ok as other code relies on this as well
             scrollType += wxEVT_SCROLL_TOP - wxEVT_SCROLLWIN_TOP;
+            wxScrollEvent event(scrollType, this->GetId(), m_thumbPos,
+                                IsVertical() ? wxVERTICAL : wxHORIZONTAL);
+            event.SetEventObject(this);
+            GetParent()->GetEventHandler()->ProcessEvent(event);
+        }
+        else // part of the window
+        {
+            wxScrollWinEvent event(scrollType, m_thumbPos,
+                                   IsVertical() ? wxVERTICAL : wxHORIZONTAL);
+            event.SetEventObject(this);
+            GetParent()->GetEventHandler()->ProcessEvent(event);
         }
-
-        wxScrollWinEvent event(scrollType, m_thumbPos,
-                               IsVertical() ? wxVERTICAL : wxHORIZONTAL);
-        event.SetEventObject(this);
-        GetParent()->GetEventHandler()->ProcessEvent(event);
     }
 
     return true;