diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index c80736f448..60caa56e2b 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -836,6 +836,11 @@ int PCBNEW_CONTROL::AppendBoard( const TOOL_EVENT& aEvent ) return 0; } + // rebuild nets and ratsnest before any use of nets + board->BuildListOfNets(); + board->SynchronizeNetsAndNetClasses(); + board->GetRatsnest()->ProcessBoard(); + m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); SELECTION_TOOL* selectionTool = m_toolMgr->GetTool(); @@ -900,11 +905,6 @@ int PCBNEW_CONTROL::AppendBoard( const TOOL_EVENT& aEvent ) editFrame->ReFillLayerWidget(); static_cast( editFrame->GetGalCanvas() )->SyncLayersVisibility( board ); - // Ratsnest - board->BuildListOfNets(); - board->SynchronizeNetsAndNetClasses(); - board->GetRatsnest()->ProcessBoard(); - // Start dragging the appended board if( selection.Size() ) // be sure at least one item is loaded {