diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 69ee7f2a86..50cf80820c 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -40,6 +40,8 @@ #include +#include + using namespace KIGFX; @@ -1303,6 +1305,17 @@ void CAIRO_GAL::endDrawing() } +void CAIRO_GAL::PostPaint() +{ + // posts an event to m_paint_listener to ask for redraw the canvas. + if( paintListener ) + { + wxPaintEvent redrawReqEvent; + wxPostEvent( paintListener, redrawReqEvent ); + } +} + + void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) { CAIRO_GAL_BASE::ResizeScreen( aWidth, aHeight ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c0150ce79f..1ec6d2d3f9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KICAD, a free EDA CAD application. * * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012-2018 Kicad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012-2020 Kicad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2013-2017 CERN * @author Maciej Suminski * @@ -352,6 +352,17 @@ wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions ) } +void OPENGL_GAL::PostPaint() +{ + // posts an event to m_paint_listener to ask for redraw the canvas. + if( paintListener ) + { + wxPaintEvent redrawReqEvent; + wxPostEvent( paintListener, redrawReqEvent ); + } +} + + bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions ) { bool refresh = false; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 635338193a..af04a6e5ae 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -2,7 +2,7 @@ * This program source code file is part of KICAD, a free EDA CAD application. * * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012-2019 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2012-2020 Kicad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2017-2018 CERN * @author Maciej Suminski * @@ -388,14 +388,7 @@ public: * posts an event to m_paint_listener. A post is used so that the actual drawing * function can use a device context type that is not specific to the wxEVT_PAINT event. */ - void PostPaint() - { - if( paintListener ) - { - wxPaintEvent redrawEvent; - wxPostEvent( paintListener, redrawEvent ); - } - } + void PostPaint(); void SetMouseListener( wxEvtHandler* aMouseListener ) { diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index abc9073354..50f83aa538 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -2,7 +2,7 @@ * This program source code file is part of KICAD, a free EDA CAD application. * * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2020 Kicad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2013-2017 CERN * @author Maciej Suminski * @@ -252,14 +252,7 @@ public: * posts an event to m_paint_listener. A post is used so that the actual drawing * function can use a device context type that is not specific to the wxEVT_PAINT event. */ - void PostPaint() - { - if( paintListener ) - { - wxPaintEvent redrawEvent; - wxPostEvent( paintListener, redrawEvent ); - } - } + void PostPaint(); void SetMouseListener( wxEvtHandler* aMouseListener ) {