reverted to former behavior for special situation when hit-test turns up nothing
This commit is contained in:
parent
7fe80baf55
commit
caa42eafca
|
@ -10,6 +10,8 @@ email address.
|
||||||
================================================================================
|
================================================================================
|
||||||
+ pcbnew
|
+ pcbnew
|
||||||
Read-ability formatting, I am playing with a C++ beautifier called uncrustify.
|
Read-ability formatting, I am playing with a C++ beautifier called uncrustify.
|
||||||
|
I had to patch it and spent 2 days getting it configured. Patch not
|
||||||
|
sent upstream yet.
|
||||||
Fixed a bug in "display local ratsnest pad or module": if you had a small
|
Fixed a bug in "display local ratsnest pad or module": if you had a small
|
||||||
module and the mouse clicked its reference text, the ratnest for
|
module and the mouse clicked its reference text, the ratnest for
|
||||||
the associated module would not show. The work around was to add
|
the associated module would not show. The work around was to add
|
||||||
|
|
|
@ -126,8 +126,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
||||||
|
|
||||||
case ID_PCB_SHOW_1_RATSNEST_BUTT:
|
case ID_PCB_SHOW_1_RATSNEST_BUTT:
|
||||||
DrawStruct = PcbGeneralLocateAndDisplay();
|
DrawStruct = PcbGeneralLocateAndDisplay();
|
||||||
if( DrawStruct )
|
Show_1_Ratsnest( DrawStruct, DC );
|
||||||
Show_1_Ratsnest( DrawStruct, DC );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PCB_MIRE_BUTT:
|
case ID_PCB_MIRE_BUTT:
|
||||||
|
|
|
@ -300,87 +300,87 @@ void WinEDA_PcbFrame::Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC )
|
||||||
if( g_Show_Ratsnest )
|
if( g_Show_Ratsnest )
|
||||||
return; // Deja Affich<63>
|
return; // Deja Affich<63>
|
||||||
|
|
||||||
if( !item )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if( (m_Pcb->m_Status_Pcb & LISTE_CHEVELU_OK) == 0 )
|
if( (m_Pcb->m_Status_Pcb & LISTE_CHEVELU_OK) == 0 )
|
||||||
{
|
{
|
||||||
Compile_Ratsnest( DC, TRUE );
|
Compile_Ratsnest( DC, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( item->m_StructType == TYPEPAD )
|
if( item )
|
||||||
{
|
{
|
||||||
pt_pad = (D_PAD*) item;
|
if( item->m_StructType == TYPEPAD )
|
||||||
Module = (MODULE*) pt_pad->m_Parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( pt_pad ) /* Affichage du chevelu du net correspondant */
|
|
||||||
{
|
|
||||||
pt_pad->Display_Infos( this );
|
|
||||||
pt_chevelu = (CHEVELU*) m_Pcb->m_Ratsnest;
|
|
||||||
for( ii = m_Pcb->GetNumRatsnests(); ii > 0; pt_chevelu++, ii-- )
|
|
||||||
{
|
{
|
||||||
if( pt_chevelu->m_NetCode == pt_pad->m_NetCode )
|
pt_pad = (D_PAD*) item;
|
||||||
|
Module = (MODULE*) pt_pad->m_Parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( pt_pad ) /* Affichage du chevelu du net correspondant */
|
||||||
|
{
|
||||||
|
pt_pad->Display_Infos( this );
|
||||||
|
pt_chevelu = (CHEVELU*) m_Pcb->m_Ratsnest;
|
||||||
|
for( ii = m_Pcb->GetNumRatsnests(); ii > 0; pt_chevelu++, ii-- )
|
||||||
{
|
{
|
||||||
if( (pt_chevelu->status & CH_VISIBLE) != 0 )
|
if( pt_chevelu->m_NetCode == pt_pad->m_NetCode )
|
||||||
continue;
|
|
||||||
pt_chevelu->status |= CH_VISIBLE;
|
|
||||||
if( (pt_chevelu->status & CH_ACTIF) == 0 )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
GRSetDrawMode( DC, GR_XOR );
|
|
||||||
GRLine( &DrawPanel->m_ClipBox, DC, pt_chevelu->pad_start->m_Pos.x,
|
|
||||||
pt_chevelu->pad_start->m_Pos.y,
|
|
||||||
pt_chevelu->pad_end->m_Pos.x,
|
|
||||||
pt_chevelu->pad_end->m_Pos.y,
|
|
||||||
0,
|
|
||||||
g_DesignSettings.m_RatsnestColor );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( item->m_StructType == TYPETEXTEMODULE )
|
|
||||||
{
|
|
||||||
Module = (MODULE*) item->m_Parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( item->m_StructType == TYPEMODULE )
|
|
||||||
{
|
|
||||||
Module = (MODULE*) item;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( Module )
|
|
||||||
{
|
|
||||||
Module->Display_Infos( this );
|
|
||||||
pt_pad = Module->m_Pads;
|
|
||||||
for( ; pt_pad != NULL; pt_pad = (D_PAD*) pt_pad->Pnext )
|
|
||||||
{
|
|
||||||
pt_chevelu = (CHEVELU*) m_Pcb->m_Ratsnest;
|
|
||||||
for( ii = m_Pcb->GetNumRatsnests(); ii > 0; pt_chevelu++, ii-- )
|
|
||||||
{
|
{
|
||||||
if( (pt_chevelu->pad_start == pt_pad)
|
if( (pt_chevelu->status & CH_VISIBLE) != 0 )
|
||||||
|| (pt_chevelu->pad_end == pt_pad) )
|
continue;
|
||||||
{
|
pt_chevelu->status |= CH_VISIBLE;
|
||||||
if( pt_chevelu->status & CH_VISIBLE )
|
if( (pt_chevelu->status & CH_ACTIF) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pt_chevelu->status |= CH_VISIBLE;
|
GRSetDrawMode( DC, GR_XOR );
|
||||||
if( (pt_chevelu->status & CH_ACTIF) == 0 )
|
GRLine( &DrawPanel->m_ClipBox, DC, pt_chevelu->pad_start->m_Pos.x,
|
||||||
continue;
|
pt_chevelu->pad_start->m_Pos.y,
|
||||||
|
pt_chevelu->pad_end->m_Pos.x,
|
||||||
GRSetDrawMode( DC, GR_XOR );
|
pt_chevelu->pad_end->m_Pos.y,
|
||||||
GRLine( &DrawPanel->m_ClipBox, DC, pt_chevelu->pad_start->m_Pos.x,
|
0,
|
||||||
pt_chevelu->pad_start->m_Pos.y,
|
g_DesignSettings.m_RatsnestColor );
|
||||||
pt_chevelu->pad_end->m_Pos.x,
|
|
||||||
pt_chevelu->pad_end->m_Pos.y,
|
|
||||||
0,
|
|
||||||
g_DesignSettings.m_RatsnestColor );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pt_pad = NULL;
|
else
|
||||||
|
{
|
||||||
|
if( item->m_StructType == TYPETEXTEMODULE )
|
||||||
|
{
|
||||||
|
Module = (MODULE*) item->m_Parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( item->m_StructType == TYPEMODULE )
|
||||||
|
{
|
||||||
|
Module = (MODULE*) item;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Module )
|
||||||
|
{
|
||||||
|
Module->Display_Infos( this );
|
||||||
|
pt_pad = Module->m_Pads;
|
||||||
|
for( ; pt_pad != NULL; pt_pad = (D_PAD*) pt_pad->Pnext )
|
||||||
|
{
|
||||||
|
pt_chevelu = (CHEVELU*) m_Pcb->m_Ratsnest;
|
||||||
|
for( ii = m_Pcb->GetNumRatsnests(); ii > 0; pt_chevelu++, ii-- )
|
||||||
|
{
|
||||||
|
if( (pt_chevelu->pad_start == pt_pad)
|
||||||
|
|| (pt_chevelu->pad_end == pt_pad) )
|
||||||
|
{
|
||||||
|
if( pt_chevelu->status & CH_VISIBLE )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
pt_chevelu->status |= CH_VISIBLE;
|
||||||
|
if( (pt_chevelu->status & CH_ACTIF) == 0 )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
GRSetDrawMode( DC, GR_XOR );
|
||||||
|
GRLine( &DrawPanel->m_ClipBox, DC, pt_chevelu->pad_start->m_Pos.x,
|
||||||
|
pt_chevelu->pad_start->m_Pos.y,
|
||||||
|
pt_chevelu->pad_end->m_Pos.x,
|
||||||
|
pt_chevelu->pad_end->m_Pos.y,
|
||||||
|
0,
|
||||||
|
g_DesignSettings.m_RatsnestColor );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pt_pad = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue