kicad-developers team mailing list archive
  
  - 
     kicad-developers team kicad-developers team
- 
    Mailing list archive
  
- 
    Message #12775
  
 Zooming in GAL with wx3.0
  
The attached patch fixes zooming using mouse wheel with wxWidgets 3.0.
Regards,
Orson
=== modified file 'common/gal/cairo/cairo_gal.cpp'
--- old/common/gal/cairo/cairo_gal.cpp	2014-02-25 14:28:09.569999000 +0100
+++ new/common/gal/cairo/cairo_gal.cpp	2014-03-19 11:54:24.060366591 +0100
@@ -64,6 +64,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent,
     Connect( wxEVT_RIGHT_DOWN,      wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
     Connect( wxEVT_RIGHT_UP,        wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
     Connect( wxEVT_RIGHT_DCLICK,    wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
+    Connect( wxEVT_MOUSEWHEEL,      wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
 #if defined _WIN32 || defined _WIN64
     Connect( wxEVT_ENTER_WINDOW,    wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
 #endif
=== modified file 'common/gal/opengl/opengl_gal.cpp'
--- old/common/gal/opengl/opengl_gal.cpp	2014-02-25 14:28:09.569999000 +0100
+++ new/common/gal/opengl/opengl_gal.cpp	2014-03-19 11:53:22.243263000 +0100
@@ -80,6 +80,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParen
     Connect( wxEVT_RIGHT_DOWN,      wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
     Connect( wxEVT_RIGHT_UP,        wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
     Connect( wxEVT_RIGHT_DCLICK,    wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
+    Connect( wxEVT_MOUSEWHEEL,      wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
 #if defined _WIN32 || defined _WIN64
     Connect( wxEVT_ENTER_WINDOW,    wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
 #endif
Follow ups