Commit 806dd7d8 authored by Maciej Suminski's avatar Maciej Suminski

Items are not recached until GAL is changed (earlier it was done on every...

Items are not recached until GAL is changed (earlier it was done on every rendering backend switch).
parent e1ecd301
...@@ -134,6 +134,9 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) ...@@ -134,6 +134,9 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect )
void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders )
{ {
if( aGalType == m_currentGal && m_gal != NULL )
return;
if( m_gal ) if( m_gal )
delete m_gal; delete m_gal;
...@@ -164,4 +167,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) ...@@ -164,4 +167,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders )
wxSize size = GetClientSize(); wxSize size = GetClientSize();
m_gal->ResizeScreen( size.GetX(), size.GetY() ); m_gal->ResizeScreen( size.GetX(), size.GetY() );
m_currentGal = aGalType;
} }
...@@ -87,6 +87,7 @@ protected: ...@@ -87,6 +87,7 @@ protected:
KiGfx::PAINTER* m_painter; ///< Contains information about how to draw items KiGfx::PAINTER* m_painter; ///< Contains information about how to draw items
///< using GAL ///< using GAL
KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.)
GalType m_currentGal; ///< Currently used GAL
std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment