Minor fixes (check for net codes size for ratsnest, cursor coordinates are not always shown as if the cursor was snapped).
This commit is contained in:
parent
b1a1b12e42
commit
84161768fa
|
@ -1023,7 +1023,6 @@ wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const
|
||||||
if( IsGalCanvasActive() )
|
if( IsGalCanvasActive() )
|
||||||
{
|
{
|
||||||
VECTOR2I cursor = GetGalCanvas()->GetViewControls()->GetCursorPosition();
|
VECTOR2I cursor = GetGalCanvas()->GetViewControls()->GetCursorPosition();
|
||||||
cursor = GetGalCanvas()->GetGAL()->GetGridPoint( cursor );
|
|
||||||
|
|
||||||
return wxPoint( cursor.x, cursor.y );
|
return wxPoint( cursor.x, cursor.y );
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,8 +216,6 @@ public:
|
||||||
bool m_show_microwave_tools;
|
bool m_show_microwave_tools;
|
||||||
bool m_show_layer_manager_tools;
|
bool m_show_layer_manager_tools;
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
PCB_EDIT_FRAME( wxWindow* father, const wxString& title,
|
PCB_EDIT_FRAME( wxWindow* father, const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
long style = KICAD_DEFAULT_DRAWFRAME_STYLE );
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ void RN_DATA::updateNet( int aNetCode )
|
||||||
{
|
{
|
||||||
assert( aNetCode < (int) m_nets.size() );
|
assert( aNetCode < (int) m_nets.size() );
|
||||||
|
|
||||||
if( aNetCode < 1 )
|
if( aNetCode < 1 || aNetCode > m_nets.size() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_nets[aNetCode].ClearSimple();
|
m_nets[aNetCode].ClearSimple();
|
||||||
|
|
Loading…
Reference in New Issue