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:
parent
a5b92a1fe4
commit
6d77e594b5
|
@ -110,9 +110,11 @@ void Refresh()
|
||||||
|
|
||||||
if( s_PcbEditFrame->IsGalCanvasActive() )
|
if( s_PcbEditFrame->IsGalCanvasActive() )
|
||||||
{
|
{
|
||||||
auto panel = static_cast<PCB_DRAW_PANEL_GAL*>( s_PcbEditFrame->GetGalCanvas() );
|
auto gal_canvas = static_cast<PCB_DRAW_PANEL_GAL*>( s_PcbEditFrame->GetGalCanvas() );
|
||||||
panel->DisplayBoard(board);
|
|
||||||
s_PcbEditFrame->GetGalCanvas()->Refresh();
|
// Reinit everything: this is the easy way to do that
|
||||||
|
s_PcbEditFrame->UseGalCanvas( true );
|
||||||
|
gal_canvas->Refresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// first argument is erase background, second is a wxRect that
|
// first argument is erase background, second is a wxRect that
|
||||||
|
|
|
@ -50,7 +50,7 @@ BOARD* LoadBoard( wxString& aFileName );
|
||||||
bool SaveBoard( wxString& aFileName, BOARD* aBoard );
|
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,
|
* (note: it is automatically called by action plugins, after running the plugin,
|
||||||
* so call this function is usually not needed inside action plugins
|
* so call this function is usually not needed inside action plugins
|
||||||
*
|
*
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
// nominal offset from the board
|
// nominal offset from the board
|
||||||
#define BOARD_OFFSET (0.05 )
|
#define BOARD_OFFSET (0.05 )
|
||||||
// min. length**2 below which 2 points are considered coincident
|
// 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,
|
static void getEndPoints( const KICADCURVE& aCurve, double& spx0, double& spy0,
|
||||||
double& epx0, double& epy0 )
|
double& epx0, double& epy0 )
|
||||||
|
|
Loading…
Reference in New Issue