From 13b96799ea1ee6f375fb719909562d89f13272f6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 30 Jul 2018 17:03:58 -0700 Subject: [PATCH] pcbnew: remove duplicate rebuild in GAL When running GAL, the connectivity is built when the board loads, so the extra call to rebuild connectivity is not needed. --- pcbnew/files.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index da010b465d..8603f6a76a 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -588,9 +588,15 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in // Select netclass Default as current netclass (it always exists) SetCurrentNetClass( NETCLASS::Default ); - // Rebuild list of nets (full ratsnest rebuild) - Compile_Ratsnest( NULL, true ); - GetBoard()->BuildConnectivity(); + // When GAL is active, the connectivity is rebuilt when the board is loaded + // For legacy, we keep these calls to ensure ratsnest + // todo: Remove legacy code + if( !IsGalCanvasActive() ) + { + // Rebuild list of nets (full ratsnest rebuild) + Compile_Ratsnest( NULL, true ); + GetBoard()->BuildConnectivity(); + } onBoardLoaded();