Refresh track & via net names after netlist update
Fixes: lp:1749411 * https://bugs.launchpad.net/kicad/+bug/1749411
This commit is contained in:
parent
4012aa70da
commit
1e054071fc
|
@ -37,14 +37,15 @@
|
||||||
#include <class_drawpanel.h>
|
#include <class_drawpanel.h>
|
||||||
#include <class_board.h>
|
#include <class_board.h>
|
||||||
#include <ratsnest_data.h>
|
#include <ratsnest_data.h>
|
||||||
|
#include <view/view.h>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST *aNetlist ) :
|
DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST* aNetlist ) :
|
||||||
DIALOG_UPDATE_PCB_BASE ( aParent ),
|
DIALOG_UPDATE_PCB_BASE( aParent ),
|
||||||
m_frame (aParent),
|
m_frame( aParent ),
|
||||||
m_netlist (aNetlist)
|
m_netlist( aNetlist )
|
||||||
{
|
{
|
||||||
m_messagePanel->SetLabel( _("Changes to be applied:") );
|
m_messagePanel->SetLabel( _("Changes to be applied:") );
|
||||||
m_messagePanel->SetLazyUpdate( true );
|
m_messagePanel->SetLazyUpdate( true );
|
||||||
|
@ -98,7 +99,7 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
|
||||||
|
|
||||||
BOARD_NETLIST_UPDATER updater( m_frame, m_frame->GetBoard() );
|
BOARD_NETLIST_UPDATER updater( m_frame, m_frame->GetBoard() );
|
||||||
updater.SetReporter ( &reporter );
|
updater.SetReporter ( &reporter );
|
||||||
updater.SetIsDryRun( aDryRun);
|
updater.SetIsDryRun( aDryRun );
|
||||||
updater.SetLookupByTimestamp( m_matchByTimestamp->GetValue() );
|
updater.SetLookupByTimestamp( m_matchByTimestamp->GetValue() );
|
||||||
updater.SetDeleteUnusedComponents ( true );
|
updater.SetDeleteUnusedComponents ( true );
|
||||||
updater.SetReplaceFootprints( true );
|
updater.SetReplaceFootprints( true );
|
||||||
|
@ -113,6 +114,13 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
|
||||||
m_frame->SetCurItem( NULL );
|
m_frame->SetCurItem( NULL );
|
||||||
m_frame->SetMsgPanel( board );
|
m_frame->SetMsgPanel( board );
|
||||||
|
|
||||||
|
// Update rendered tracks and vias net labels
|
||||||
|
auto view = m_frame->GetGalCanvas()->GetView();
|
||||||
|
|
||||||
|
// TODO is there a way to extract information about which nets were modified?
|
||||||
|
for( auto track : board->Tracks() )
|
||||||
|
view->Update( track );
|
||||||
|
|
||||||
std::vector<MODULE*> newFootprints = updater.GetAddedComponents();
|
std::vector<MODULE*> newFootprints = updater.GetAddedComponents();
|
||||||
|
|
||||||
// Spread new footprints.
|
// Spread new footprints.
|
||||||
|
|
|
@ -169,6 +169,10 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
|
||||||
// Rebuild the board connectivity:
|
// Rebuild the board connectivity:
|
||||||
board->GetConnectivity()->Build( board );
|
board->GetConnectivity()->Build( board );
|
||||||
|
|
||||||
|
// TODO is there a way to extract information about which nets were modified?
|
||||||
|
for( auto track : board->Tracks() )
|
||||||
|
view->Update( track );
|
||||||
|
|
||||||
SetMsgPanel( board );
|
SetMsgPanel( board );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue