From 595caf30a228e553e8dcd71e25befe12cce0cb5f Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Thu, 30 Dec 2021 09:20:09 -0500 Subject: [PATCH] 3D viewer: Disable copper thickness in OpenGL mode Fixes https://gitlab.com/kicad/code/kicad/-/issues/10153 (cherry picked from commit 517e44e91721d98fd1f98c4e57f8f604c049ef2a) --- 3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp b/3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp index 34d13cfb81..1bd48b000a 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp @@ -29,7 +29,7 @@ using KIGFX::COLOR4D; ///! Update the schema version whenever a migration is required -const int viewer3dSchemaVersion = 1; +const int viewer3dSchemaVersion = 2; EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() @@ -63,7 +63,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() // OpenGL options m_params.emplace_back( new PARAM( "render.opengl_copper_thickness", - &m_Render.opengl_copper_thickness, true ) ); + &m_Render.opengl_copper_thickness, false ) ); m_params.emplace_back( new PARAM( "render.opengl_show_model_bbox", &m_Render.opengl_show_model_bbox, false ) ); m_params.emplace_back( new PARAM( "render.opengl_highlight_on_rollover", @@ -202,6 +202,12 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() &m_Camera.projection_mode, 1 ) ); registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) ); + + registerMigration( 1, 2, [&]() -> bool + { + Set( "render.opengl_copper_thickness", false ); + return true; + } ); }