diff --git a/pcbnew/swig/pcbnew_scripting_helpers.cpp b/pcbnew/swig/pcbnew_scripting_helpers.cpp index a5af6cdc5f..3dbedc32c9 100644 --- a/pcbnew/swig/pcbnew_scripting_helpers.cpp +++ b/pcbnew/swig/pcbnew_scripting_helpers.cpp @@ -39,6 +39,7 @@ #include #include #include +#include static PCB_EDIT_FRAME* s_PcbEditFrame = NULL; @@ -103,8 +104,15 @@ void Refresh() { if( s_PcbEditFrame ) { + auto board = s_PcbEditFrame->GetBoard(); + board->BuildConnectivity(); + if( s_PcbEditFrame->IsGalCanvasActive() ) + { + auto panel = static_cast( s_PcbEditFrame->GetGalCanvas() ); + panel->DisplayBoard(board); s_PcbEditFrame->GetGalCanvas()->Refresh(); + } else // first argument is erase background, second is a wxRect that // defines a reftresh area (all canvas if null)