fixed: pcbnew crashes when clicking on a zone

This commit is contained in:
CHARRAS 2007-09-26 12:15:55 +00:00
parent afedb36134
commit b128acfc17
5 changed files with 554 additions and 525 deletions

View File

@ -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
; ;

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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 )
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 )
if( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) ) if( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) )
break; break;
SendMessageToEESCHEMA( DrawStruct );
// Element localis<69> // Element localis<69>
SetCurItem( DrawStruct ); SetCurItem( DrawStruct );