Commit b128acfc authored by CHARRAS's avatar CHARRAS

fixed: pcbnew crashes when clicking on a zone

parent afedb361
......@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
(wxT("(2007-09-22)"))
(wxT("(2007-09-26)"))
#endif
;
......
No preview for this file type
This diff is collapsed.
......@@ -233,6 +233,7 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay( int aHotKeyCode )
{
m_Collector->Remove( ii );
ii--;
limit = m_Collector->GetCount();
}
else
timestampzone = item->m_TimeStamp;
......
......@@ -91,12 +91,16 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
}
else
{
DrawStruct = PcbGeneralLocateAndDisplay();
if( DrawStruct )
SendMessageToEESCHEMA( DrawStruct );
if ( ! wxGetKeyState(WXK_SHIFT) && ! wxGetKeyState(WXK_ALT) &&
! wxGetKeyState(WXK_CONTROL) && ! wxGetKeyState(WXK_TAB))
{
DrawStruct = PcbGeneralLocateAndDisplay();
if( DrawStruct )
SendMessageToEESCHEMA( DrawStruct );
}
}
}
switch( m_ID_current_state )
{
case ID_MAIN_MENUBAR:
......@@ -321,6 +325,8 @@ void WinEDA_PcbFrame::SendMessageToEESCHEMA( EDA_BaseStruct* objectToSync )
char cmd[1024];
MODULE* module = NULL;
if ( objectToSync == NULL ) return ;
if( objectToSync->Type() == TYPEMODULE )
module = (MODULE*) objectToSync;
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) )
break;
SendMessageToEESCHEMA( DrawStruct );
// Element localis�
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