Commit b128acfc authored by CHARRAS's avatar CHARRAS

fixed: pcbnew crashes when clicking on a zone

parent afedb361
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE #ifdef EDA_BASE
(wxT("(2007-09-22)")) (wxT("(2007-09-26)"))
#endif #endif
; ;
......
No preview for this file type
This diff is collapsed.
...@@ -233,6 +233,7 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode ) ...@@ -233,6 +233,7 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
{ {
m_Collector->Remove( ii ); m_Collector->Remove( ii );
ii--; ii--;
limit = m_Collector->GetCount();
} }
else else
timestampzone = item->m_TimeStamp; timestampzone = item->m_TimeStamp;
......
...@@ -91,12 +91,16 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -91,12 +91,16 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
} }
else else
{ {
DrawStruct = PcbGeneralLocateAndDisplay(); if ( ! wxGetKeyState(WXK_SHIFT) && ! wxGetKeyState(WXK_ALT) &&
if( DrawStruct ) ! wxGetKeyState(WXK_CONTROL) && ! wxGetKeyState(WXK_TAB))
SendMessageToEESCHEMA( DrawStruct ); {
DrawStruct = PcbGeneralLocateAndDisplay();
if( DrawStruct )
SendMessageToEESCHEMA( DrawStruct );
}
} }
} }
switch( m_ID_current_state ) switch( m_ID_current_state )
{ {
case ID_MAIN_MENUBAR: case ID_MAIN_MENUBAR:
...@@ -321,6 +325,8 @@ void WinEDA_PcbFrame::SendMessageToEESCHEMA( EDA_BaseStruct* objectToSync ) ...@@ -321,6 +325,8 @@ void WinEDA_PcbFrame::SendMessageToEESCHEMA( EDA_BaseStruct* objectToSync )
char cmd[1024]; char cmd[1024];
MODULE* module = NULL; MODULE* module = NULL;
if ( objectToSync == NULL ) return ;
if( objectToSync->Type() == TYPEMODULE ) if( objectToSync->Type() == TYPEMODULE )
module = (MODULE*) objectToSync; module = (MODULE*) objectToSync;
else if( objectToSync->Type() == TYPEPAD ) else if( objectToSync->Type() == TYPEPAD )
...@@ -1253,6 +1259,8 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -1253,6 +1259,8 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) ) if( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) )
break; break;
SendMessageToEESCHEMA( DrawStruct );
// Element localis� // Element localis�
SetCurItem( DrawStruct ); SetCurItem( DrawStruct );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment