Python binding: fix pcbnew.Refresh() to make a better re-initialization.

Minor fixes in comments.

Fixes: lp:1775003
https://bugs.launchpad.net/kicad/+bug/1775003
This commit is contained in:
jean-pierre charras 2018-06-07 10:03:26 +02:00
parent a5b92a1fe4
commit 6d77e594b5
3 changed files with 7 additions and 5 deletions

View File

@ -110,9 +110,11 @@ void Refresh()
if( s_PcbEditFrame->IsGalCanvasActive() )
{
auto panel = static_cast<PCB_DRAW_PANEL_GAL*>( s_PcbEditFrame->GetGalCanvas() );
panel->DisplayBoard(board);
s_PcbEditFrame->GetGalCanvas()->Refresh();
auto gal_canvas = static_cast<PCB_DRAW_PANEL_GAL*>( s_PcbEditFrame->GetGalCanvas() );
// Reinit everything: this is the easy way to do that
s_PcbEditFrame->UseGalCanvas( true );
gal_canvas->Refresh();
}
else
// first argument is erase background, second is a wxRect that

View File

@ -50,7 +50,7 @@ BOARD* LoadBoard( wxString& aFileName );
bool SaveBoard( wxString& aFileName, BOARD* aBoard );
/**
* Update the board display after modifying it bu a python script
* Update the board display after modifying it by a python script
* (note: it is automatically called by action plugins, after running the plugin,
* so call this function is usually not needed inside action plugins
*

View File

@ -82,7 +82,7 @@
// nominal offset from the board
#define BOARD_OFFSET (0.05 )
// min. length**2 below which 2 points are considered coincident
#define MIN_LENGTH2 (0.0001)
#define MIN_LENGTH2 (0.0001) // = 0.01*0.01
static void getEndPoints( const KICADCURVE& aCurve, double& spx0, double& spy0,
double& epx0, double& epy0 )