From eb89d1c68b053577240b1c9561bfc89f3350c1fc Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 16 Jun 2020 11:18:52 -0700 Subject: [PATCH] pcbnew: Minor update to ratsnest calc BuildConnectivity updates the ratsnest after it completes. By compiling the ratsnest before connectivity, we update it twice with the dirty flag being reset after connectivity updates. --- pcbnew/dialogs/panel_setup_layers.cpp | 2 +- pcbnew/files.cpp | 2 +- pcbnew/pcb_edit_frame.cpp | 2 +- pcbnew/tools/pcbnew_control.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/dialogs/panel_setup_layers.cpp b/pcbnew/dialogs/panel_setup_layers.cpp index d3c9970021..7c1f325292 100644 --- a/pcbnew/dialogs/panel_setup_layers.cpp +++ b/pcbnew/dialogs/panel_setup_layers.cpp @@ -567,8 +567,8 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow() if( hasRemovedBoardItems ) { // Rebuild list of nets (full ratsnest rebuild) - m_frame->Compile_Ratsnest( true ); m_pcb->BuildConnectivity(); + m_frame->Compile_Ratsnest( true ); } return true; diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 2b019b0dbc..5b543f0cdf 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -636,8 +636,8 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SetCurrentNetClass( NETCLASS::Default ); // Rebuild list of nets (full ratsnest rebuild) - Compile_Ratsnest( true ); GetBoard()->BuildConnectivity(); + Compile_Ratsnest( true ); onBoardLoaded(); diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 122f740e37..fd781f9eaa 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -896,8 +896,8 @@ void PCB_EDIT_FRAME::UpdateUserInterface() // (layer and items visibility, colors ...) // Rebuild list of nets (full ratsnest rebuild) - Compile_Ratsnest( true ); GetBoard()->BuildConnectivity(); + Compile_Ratsnest( true ); // Update info shown by the horizontal toolbars ReCreateLayerBox(); diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 2ffe96f85c..61661245d9 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -669,8 +669,8 @@ int PCBNEW_CONTROL::Paste( const TOOL_EVENT& aEvent ) { placeBoardItems( clipBoard, true ); - m_frame->Compile_Ratsnest( true ); m_frame->GetBoard()->BuildConnectivity(); + m_frame->Compile_Ratsnest( true ); } break;