Hide OpenGL scrollbars on OS X to fix freeze. (fixes lp:1553428)

This commit is contained in:
Simon Wells 2016-08-09 15:07:17 -04:00 committed by Wayne Stambaugh
parent f776b7c3fb
commit 3b4cdd96ab
1 changed files with 10 additions and 0 deletions

View File

@ -66,7 +66,13 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
SwitchBackend( aGalType );
SetBackgroundStyle( wxBG_STYLE_CUSTOM );
// Scrollbars broken in GAL on OSX
#ifdef __WXMAC__
ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
#else
ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS );
#endif
EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas
m_painter = new KIGFX::PCB_PAINTER( m_gal );
@ -144,7 +150,11 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
m_drawing = true;
// Scrollbars broken in GAL on OSX
#ifndef __WXMAC__
m_viewControls->UpdateScrollbars();
#endif
m_view->UpdateItems();
m_gal->BeginDrawing();
m_gal->ClearScreen( m_painter->GetSettings()->GetBackgroundColor() );