From 3b4cdd96abd6cd55bc7d7c5b1e8bdbaeba918c18 Mon Sep 17 00:00:00 2001 From: Simon Wells Date: Tue, 9 Aug 2016 15:07:17 -0400 Subject: [PATCH] Hide OpenGL scrollbars on OS X to fix freeze. (fixes lp:1553428) --- common/draw_panel_gal.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 783dadad1a..2cd2e4c262 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -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() );