diff --git a/common/base_screen.cpp b/common/base_screen.cpp index 13399d6a07..3a77b43a4d 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -258,11 +258,6 @@ int BASE_SCREEN::SetGrid( const wxRealPoint& size ) } m_Grid = nearest_grid; - - wxLogWarning( _( "Grid size( %f, %f ) not in grid list, falling back " - "to grid size( %f, %f )." ), - size.x, size.y, m_Grid.m_Size.x, m_Grid.m_Size.y ); - return gridIdx; } @@ -281,11 +276,6 @@ int BASE_SCREEN::SetGrid( int aCommandId ) } m_Grid = m_grids[0]; - - wxLogWarning( _( "Grid ID %d not in grid list, falling back to " - "grid size( %g, %g )." ), aCommandId, - m_Grid.m_Size.x, m_Grid.m_Size.y ); - return m_grids[0].m_CmdId - ID_POPUP_GRID_LEVEL_1000; } diff --git a/common/legacy_gal/eda_draw_frame.cpp b/common/legacy_gal/eda_draw_frame.cpp index e8d8cef2ee..fa1eec228b 100644 --- a/common/legacy_gal/eda_draw_frame.cpp +++ b/common/legacy_gal/eda_draw_frame.cpp @@ -1069,8 +1069,10 @@ EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::LoadCanvasTypeSetting() wxConfigBase* cfg = Kiface().KifaceSettings(); if( cfg ) - canvasType = (EDA_DRAW_PANEL_GAL::GAL_TYPE) cfg->ReadLong( GetCanvasTypeKey(), - EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE ); + { + canvasType = (EDA_DRAW_PANEL_GAL::GAL_TYPE) + cfg->ReadLong( GetCanvasTypeKey(), EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE ); + } if( canvasType < EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE || canvasType >= EDA_DRAW_PANEL_GAL::GAL_TYPE_LAST ) @@ -1084,7 +1086,12 @@ EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::LoadCanvasTypeSetting() if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE && !ADVANCED_CFG::GetCfg().AllowLegacyCanvas() ) { +#ifdef __WXMAC__ + // Cairo renderer doesn't handle Retina displays + canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL; +#else canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO; +#endif } return canvasType; diff --git a/common/legacy_wx/eda_draw_frame.cpp b/common/legacy_wx/eda_draw_frame.cpp index b097000c70..8702c30315 100644 --- a/common/legacy_wx/eda_draw_frame.cpp +++ b/common/legacy_wx/eda_draw_frame.cpp @@ -1322,8 +1322,10 @@ EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::LoadCanvasTypeSetting() wxConfigBase* cfg = Kiface().KifaceSettings(); if( cfg ) - canvasType = (EDA_DRAW_PANEL_GAL::GAL_TYPE) cfg->ReadLong( GetCanvasTypeKey(), - EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE ); + { + canvasType = (EDA_DRAW_PANEL_GAL::GAL_TYPE) + cfg->ReadLong( GetCanvasTypeKey(), EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE ); + } if( canvasType < EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE || canvasType >= EDA_DRAW_PANEL_GAL::GAL_TYPE_LAST ) @@ -1337,7 +1339,12 @@ EDA_DRAW_PANEL_GAL::GAL_TYPE EDA_DRAW_FRAME::LoadCanvasTypeSetting() if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE && !ADVANCED_CFG::GetCfg().AllowLegacyCanvas() ) { +#ifdef __WXMAC__ + // Cairo renderer doesn't handle Retina displays + canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL; +#else canvasType = EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO; +#endif } return canvasType; diff --git a/pcbnew/footprint_preview_panel.cpp b/pcbnew/footprint_preview_panel.cpp index 8d9ce75bdc..4a871870bd 100644 --- a/pcbnew/footprint_preview_panel.cpp +++ b/pcbnew/footprint_preview_panel.cpp @@ -396,13 +396,15 @@ FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::New( KIWAY* aKiway, wxWindow* } #ifdef __WXMAC__ - // Cairo renderer doesn't handle Retina displays - EDA_DRAW_PANEL_GAL::GAL_TYPE backend = EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL; + // Cairo renderer doesn't handle Retina displays so default to OpenGL + EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = (EDA_DRAW_PANEL_GAL::GAL_TYPE) + cfg->ReadLong( CanvasTypeKeyBase, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); #else - EDA_DRAW_PANEL_GAL::GAL_TYPE backend = EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO; + EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = (EDA_DRAW_PANEL_GAL::GAL_TYPE) + cfg->ReadLong( CanvasTypeKeyBase, EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ); #endif - auto panel = new FOOTPRINT_PREVIEW_PANEL( aKiway, aParent, gal_opts, backend ); + auto panel = new FOOTPRINT_PREVIEW_PANEL( aKiway, aParent, gal_opts, canvasType ); if( pcbnew ) { diff --git a/pcbnew/footprint_viewer_frame.cpp b/pcbnew/footprint_viewer_frame.cpp index 45b0daa150..3bced911f8 100644 --- a/pcbnew/footprint_viewer_frame.cpp +++ b/pcbnew/footprint_viewer_frame.cpp @@ -193,14 +193,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent UpdateTitle(); // Create GAL canvas -#ifdef __WXMAC__ - // Cairo renderer doesn't handle Retina displays - EDA_DRAW_PANEL_GAL::GAL_TYPE backend = EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL; -#else - EDA_DRAW_PANEL_GAL::GAL_TYPE backend = EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO; -#endif PCB_DRAW_PANEL_GAL* drawPanel = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, - GetGalDisplayOptions(), backend ); + GetGalDisplayOptions(), + LoadCanvasTypeSetting() ); SetGalCanvas( drawPanel ); // Create the manager and dispatcher & route draw panel events to the dispatcher