Eeschema: bug 706677 fixed (delete connection, junction persist).
This was due to a duplicate constants ( with sligtly different values) used to select items in some seach functions that broke filtering. Old definitions removed.
This commit is contained in:
parent
da9f4b8ac2
commit
4f3708c13f
|
@ -6,7 +6,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef KICAD_BUILD_VERSION
|
||||
#define KICAD_BUILD_VERSION "(2011-01-21 BZR 2753)"
|
||||
#define KICAD_BUILD_VERSION "(2011-01-25 BZR 2758)"
|
||||
#endif
|
||||
|
||||
//#define VERSION_STABILITY "stable"
|
||||
|
|
|
@ -666,7 +666,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
|
|||
switch( layer )
|
||||
{
|
||||
case LAYER_BUS:
|
||||
item = PickStruct( pos, screen, BUSITEM );
|
||||
item = PickStruct( pos, screen, BUS_T );
|
||||
|
||||
if( item )
|
||||
return TRUE;
|
||||
|
@ -683,13 +683,13 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
|
|||
break;
|
||||
|
||||
case LAYER_NOTES:
|
||||
item = PickStruct( pos, screen, DRAWITEM );
|
||||
item = PickStruct( pos, screen, DRAW_ITEM_T );
|
||||
if( item )
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
case LAYER_WIRE:
|
||||
item = PickStruct( pos, screen, RACCORDITEM | JUNCTIONITEM );
|
||||
item = PickStruct( pos, screen, BUS_ENTRY_T | JUNCTION_T );
|
||||
|
||||
if( item )
|
||||
return TRUE;
|
||||
|
@ -708,12 +708,12 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
item = PickStruct( pos, screen, WIREITEM );
|
||||
item = PickStruct( pos, screen, WIRE_T );
|
||||
|
||||
if( item )
|
||||
return TRUE;
|
||||
|
||||
item = PickStruct( pos, screen, LABELITEM );
|
||||
item = PickStruct( pos, screen, LABEL_T );
|
||||
if( item && (item->Type() != SCH_TEXT_T)
|
||||
&& ( ( (SCH_GLOBALLABEL*) item )->m_Pos.x == pos.x )
|
||||
&& ( ( (SCH_GLOBALLABEL*) item )->m_Pos.y == pos.y ) )
|
||||
|
@ -749,12 +749,12 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
|
|||
*/
|
||||
bool IsJunctionNeeded( SCH_EDIT_FRAME* frame, wxPoint& pos )
|
||||
{
|
||||
if( PickStruct( pos, frame->GetScreen(), JUNCTIONITEM ) )
|
||||
if( PickStruct( pos, frame->GetScreen(), JUNCTION_T ) )
|
||||
return FALSE;
|
||||
|
||||
if( PickStruct( pos, frame->GetScreen(), WIREITEM | EXCLUDE_WIRE_BUS_ENDPOINTS ) )
|
||||
if( PickStruct( pos, frame->GetScreen(), WIRE_T | EXCLUDE_ENDPOINTS_T ) )
|
||||
{
|
||||
if( PickStruct( pos, frame->GetScreen(), WIREITEM | WIRE_BUS_ENDPOINTS_ONLY ) )
|
||||
if( PickStruct( pos, frame->GetScreen(), WIRE_T | ENDPOINTS_ONLY_T ) )
|
||||
return TRUE;
|
||||
|
||||
if( frame->GetScreen()->GetPin( pos, NULL, true ) )
|
||||
|
|
|
@ -127,7 +127,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
wxString Text;
|
||||
wxString msg;
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), MARKERITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), MARKER_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return DrawStruct;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), NOCONNECTITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), NO_CONNECT_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -143,7 +143,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return DrawStruct;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), JUNCTIONITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), JUNCTION_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -152,7 +152,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(),
|
||||
WIREITEM | BUSITEM | RACCORDITEM );
|
||||
WIRE_T | BUS_T | BUS_ENTRY_T );
|
||||
|
||||
if( DrawStruct ) // We have found a wire: Search for a connected pin at the same location
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return DrawStruct;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), FIELDCMPITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), FIELD_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return DrawStruct;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), LABELITEM | TEXTITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), LABEL_T | TEXT_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return LibItem;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), LIBITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), COMPONENT_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return DrawStruct;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), SHEETITEM );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), SHEET_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ SCH_ITEM* SCH_EDIT_FRAME::SchematicGeneralLocateAndDisplay( const wxPoint& refpo
|
|||
return DrawStruct;
|
||||
}
|
||||
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), SEARCHALL );
|
||||
DrawStruct = (SCH_ITEM*) PickStruct( refpoint, GetScreen(), NO_FILTER_T );
|
||||
|
||||
if( DrawStruct )
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection )
|
|||
|
||||
while( DelStruct
|
||||
&& ( DelStruct = PickStruct( screen->m_Curseur, screen,
|
||||
JUNCTIONITEM | WIREITEM | BUSITEM ) ) != NULL )
|
||||
JUNCTION_T | WIRE_T | BUS_T ) ) != NULL )
|
||||
{
|
||||
DelStruct->m_Flags = SELECTEDNODE | STRUCT_DELETED;
|
||||
|
||||
|
@ -111,7 +111,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection )
|
|||
screen->SetDrawItems( DelStruct );
|
||||
}
|
||||
|
||||
screen->SetDrawItems( savedItems );
|
||||
screen->SetDrawItems( savedItems ); // Restore the list entry point.
|
||||
|
||||
/* Mark all wires, junctions, .. connected to one of the item to delete
|
||||
*/
|
||||
|
@ -246,7 +246,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection )
|
|||
continue;
|
||||
|
||||
GetScreen()->m_Curseur = ( (SCH_TEXT*) DelStruct )->m_Pos;
|
||||
EDA_ITEM* TstStruct = PickStruct( screen->m_Curseur, GetScreen(), WIREITEM | BUSITEM );
|
||||
EDA_ITEM* TstStruct = PickStruct( screen->m_Curseur, GetScreen(), WIRE_T | BUS_T );
|
||||
|
||||
if( TstStruct && TstStruct->m_Flags & STRUCT_DELETED )
|
||||
{
|
||||
|
@ -279,9 +279,9 @@ void SCH_EDIT_FRAME::DeleteConnection( bool DeleteFullConnection )
|
|||
* 2 : JUNCTION
|
||||
* 2 : NOCONNECT
|
||||
* 3 : WIRE or BUS
|
||||
* 4 : DRAWITEM
|
||||
* 4 : GRAPHIC ITEM
|
||||
* 5 : TEXT
|
||||
* 6 : COMPOSANT
|
||||
* 6 : COMPONENT
|
||||
* 7 : SHEET
|
||||
*
|
||||
* return TRUE if an item was deleted
|
||||
|
@ -292,23 +292,23 @@ bool LocateAndDeleteItem( SCH_EDIT_FRAME* frame, wxDC* DC )
|
|||
SCH_SCREEN* screen = (SCH_SCREEN*) ( frame->GetScreen() );
|
||||
bool item_deleted = FALSE;
|
||||
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, MARKERITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, MARKER_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, JUNCTIONITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, JUNCTION_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, NOCONNECTITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, NO_CONNECT_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, RACCORDITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, BUS_ENTRY_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, WIREITEM | BUSITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, WIRE_T | BUS_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, DRAWITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, DRAW_ITEM_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, TEXTITEM | LABELITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, TEXT_T | LABEL_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, LIBITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, COMPONENT_T );
|
||||
if( DelStruct == NULL )
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, SHEETITEM );
|
||||
DelStruct = PickStruct( screen->m_Curseur, screen, SHEET_T );
|
||||
|
||||
if( DelStruct )
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ void SCH_EDIT_FRAME::ChangeTextOrient( SCH_TEXT* TextStruct, wxDC* DC )
|
|||
{
|
||||
if( TextStruct == NULL )
|
||||
TextStruct = (SCH_TEXT*) PickStruct( GetScreen()->m_Curseur,
|
||||
GetScreen(), TEXTITEM | LABELITEM );
|
||||
GetScreen(), TEXT_T | LABEL_T );
|
||||
if( TextStruct == NULL )
|
||||
return;
|
||||
|
||||
|
|
|
@ -45,29 +45,6 @@ class TRANSFORM;
|
|||
|
||||
extern wxString g_DefaultSchematicFileName;
|
||||
|
||||
/* Search mask for locating objects in editor. */
|
||||
#define LIBITEM 1
|
||||
#define WIREITEM 2
|
||||
#define BUSITEM 4
|
||||
#define RACCORDITEM 4
|
||||
#define JUNCTIONITEM 0x10
|
||||
#define DRAWITEM 0x20
|
||||
#define TEXTITEM 0x40
|
||||
#define LABELITEM 0x80
|
||||
#define SHEETITEM 0x100
|
||||
#define MARKERITEM 0x200
|
||||
#define NOCONNECTITEM 0x400
|
||||
#define SEARCH_PINITEM 0x800
|
||||
#define SHEETLABELITEM 0x1000
|
||||
#define FIELDCMPITEM 0x2000
|
||||
#define EXCLUDE_WIRE_BUS_ENDPOINTS 0x4000
|
||||
#define WIRE_BUS_ENDPOINTS_ONLY 0x8000
|
||||
|
||||
#define SEARCHALL ( LIBITEM | WIREITEM | BUSITEM | RACCORDITEM | \
|
||||
JUNCTIONITEM | DRAWITEM | TEXTITEM | LABELITEM | \
|
||||
SHEETITEM | MARKERITEM | NOCONNECTITEM | \
|
||||
SEARCH_PINITEM | SHEETLABELITEM )
|
||||
|
||||
typedef enum
|
||||
{
|
||||
LAYER_WIRE,
|
||||
|
|
|
@ -699,7 +699,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
|
|||
if( DrawStruct->Type() == SCH_JUNCTION_T )
|
||||
{
|
||||
// If it's a junction, pick the underlying wire instead
|
||||
DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), WIREITEM );
|
||||
DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), WIRE_T );
|
||||
}
|
||||
if( DrawStruct == NULL )
|
||||
break;
|
||||
|
@ -778,7 +778,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
|
|||
if( DrawStruct == NULL )
|
||||
{
|
||||
DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(),
|
||||
LIBITEM | TEXTITEM | LABELITEM | SHEETITEM );
|
||||
COMPONENT_T | TEXT_T | LABEL_T | SHEET_T );
|
||||
if( DrawStruct == NULL )
|
||||
break;
|
||||
if( DrawStruct->Type() == SCH_COMPONENT_T )
|
||||
|
|
|
@ -45,9 +45,9 @@ SCH_COMPONENT* LocateSmallestComponent( SCH_SCREEN* Screen )
|
|||
|
||||
while( DrawList )
|
||||
{
|
||||
if( !SnapPoint2( Screen->m_MousePosition, LIBITEM, DrawList ) )
|
||||
if( !SnapPoint2( Screen->m_MousePosition, COMPONENT_T, DrawList ) )
|
||||
{
|
||||
if( !SnapPoint2( Screen->m_Curseur, LIBITEM, DrawList ) )
|
||||
if( !SnapPoint2( Screen->m_Curseur, COMPONENT_T, DrawList ) )
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -79,24 +79,24 @@ SCH_COMPONENT* LocateSmallestComponent( SCH_SCREEN* Screen )
|
|||
|
||||
/* Search an item at pos refpos
|
||||
* SearchMask = (bitwise OR):
|
||||
* LIBITEM
|
||||
* WIREITEM
|
||||
* BUSITEM
|
||||
* RACCORDITEM
|
||||
* JUNCTIONITEM
|
||||
* DRAWITEM
|
||||
* TEXTITEM
|
||||
* LABELITEM
|
||||
* COMPONENT_T
|
||||
* WIRE_T
|
||||
* BUS_T
|
||||
* BUS_ENTRY_T
|
||||
* JUNCTION_T
|
||||
* DRAW_ITEM_T
|
||||
* TEXT_T
|
||||
* LABEL_T
|
||||
* SHEETITEM
|
||||
* MARKERITEM
|
||||
* NOCONNECTITEM
|
||||
* MARKER_T
|
||||
* NO_CONNECT_T
|
||||
* SEARCH_PINITEM
|
||||
* SHEETLABELITEM
|
||||
* SHEETLABEL_T
|
||||
* FIELDCMPITEM
|
||||
*
|
||||
* if EXCLUDE_WIRE_BUS_ENDPOINTS is set, in wire or bus search and locate,
|
||||
* if EXCLUDE_ENDPOINTS_T is set, in wire or bus search and locate,
|
||||
* start and end points are not included in search
|
||||
* if WIRE_BUS_ENDPOINTS_ONLY is set, in wire or bus search and locate,
|
||||
* if ENDPOINTS_ONLY_T is set, in wire or bus search and locate,
|
||||
* only start and end points are included in search
|
||||
*
|
||||
*
|
||||
|
@ -137,7 +137,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_POLYLINE_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_POLYLINE*) DrawList )
|
||||
if( !( SearchMask & (DRAWITEM | WIREITEM | BUSITEM) ) )
|
||||
if( !( SearchMask & (DRAW_ITEM_T | WIRE_T | BUS_T) ) )
|
||||
break;
|
||||
|
||||
for( unsigned i = 0; i < STRUCT->GetCornerCount() - 1; i++ )
|
||||
|
@ -155,19 +155,19 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_LINE_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_LINE*) DrawList )
|
||||
if( !( SearchMask & (DRAWITEM | WIREITEM | BUSITEM) ) )
|
||||
if( !( SearchMask & (DRAW_ITEM_T | WIRE_T | BUS_T) ) )
|
||||
break;
|
||||
|
||||
if( TestSegmentHit( aPosRef, STRUCT->m_Start, STRUCT->m_End, 0 ) )
|
||||
{
|
||||
if( ( ( SearchMask & DRAWITEM ) && ( STRUCT->GetLayer() == LAYER_NOTES ) )
|
||||
|| ( ( SearchMask & WIREITEM ) && ( STRUCT->GetLayer() == LAYER_WIRE ) )
|
||||
|| ( ( SearchMask & BUSITEM ) && ( STRUCT->GetLayer() == LAYER_BUS ) ) )
|
||||
if( ( ( SearchMask & DRAW_ITEM_T ) && ( STRUCT->GetLayer() == LAYER_NOTES ) )
|
||||
|| ( ( SearchMask & WIRE_T ) && ( STRUCT->GetLayer() == LAYER_WIRE ) )
|
||||
|| ( ( SearchMask & BUS_T ) && ( STRUCT->GetLayer() == LAYER_BUS ) ) )
|
||||
{
|
||||
if( SearchMask & EXCLUDE_WIRE_BUS_ENDPOINTS && STRUCT->IsEndPoint( aPosRef ) )
|
||||
if( SearchMask & EXCLUDE_ENDPOINTS_T && STRUCT->IsEndPoint( aPosRef ) )
|
||||
break;
|
||||
|
||||
if( SearchMask & WIRE_BUS_ENDPOINTS_ONLY && !STRUCT->IsEndPoint( aPosRef ) )
|
||||
if( SearchMask & ENDPOINTS_ONLY_T && !STRUCT->IsEndPoint( aPosRef ) )
|
||||
break;
|
||||
|
||||
LastSnappedStruct = DrawList;
|
||||
|
@ -180,7 +180,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_BUS_ENTRY_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_BUS_ENTRY*) DrawList )
|
||||
if( !( SearchMask & (RACCORDITEM) ) )
|
||||
if( !( SearchMask & (BUS_ENTRY_T) ) )
|
||||
break;
|
||||
|
||||
if( TestSegmentHit( aPosRef, STRUCT->m_Pos, STRUCT->m_End(), hitminDist ) )
|
||||
|
@ -193,7 +193,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_JUNCTION_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_JUNCTION*) DrawList )
|
||||
if( !(SearchMask & JUNCTIONITEM) )
|
||||
if( !(SearchMask & JUNCTION_T) )
|
||||
break;
|
||||
if( STRUCT->HitTest( aPosRef ) )
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_NO_CONNECT_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_NO_CONNECT*) DrawList )
|
||||
if( !(SearchMask & NOCONNECTITEM) )
|
||||
if( !(SearchMask & NO_CONNECT_T) )
|
||||
break;
|
||||
if( STRUCT->HitTest( aPosRef ) )
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
{
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_MARKER*) DrawList )
|
||||
if( !(SearchMask & MARKERITEM) )
|
||||
if( !(SearchMask & MARKER_T) )
|
||||
break;
|
||||
if( STRUCT->HitTest( aPosRef ) )
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_TEXT_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_TEXT*) DrawList )
|
||||
if( !( SearchMask & TEXTITEM) )
|
||||
if( !( SearchMask & TEXT_T) )
|
||||
break;
|
||||
if( STRUCT->HitTest( aPosRef ) )
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_TEXT*) DrawList ) // SCH_TEXT is the base
|
||||
// class of these labels
|
||||
if( !(SearchMask & LABELITEM) )
|
||||
if( !(SearchMask & LABEL_T) )
|
||||
break;
|
||||
if( STRUCT->HitTest( aPosRef ) )
|
||||
{
|
||||
|
@ -257,10 +257,10 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
break;
|
||||
|
||||
case SCH_COMPONENT_T:
|
||||
if( !( SearchMask & (LIBITEM | FIELDCMPITEM) ) )
|
||||
if( !( SearchMask & (COMPONENT_T | FIELD_T) ) )
|
||||
break;
|
||||
|
||||
if( SearchMask & FIELDCMPITEM )
|
||||
if( SearchMask & FIELD_T )
|
||||
{
|
||||
SCH_COMPONENT* DrawLibItem = (SCH_COMPONENT*) DrawList;
|
||||
for( int i = REFERENCE; i < DrawLibItem->GetFieldCount(); i++ )
|
||||
|
@ -299,7 +299,7 @@ bool SnapPoint2( const wxPoint& aPosRef, int SearchMask, SCH_ITEM* DrawList )
|
|||
case SCH_SHEET_T:
|
||||
#undef STRUCT
|
||||
#define STRUCT ( (SCH_SHEET*) DrawList )
|
||||
if( !(SearchMask & SHEETITEM) )
|
||||
if( !(SearchMask & SHEET_T) )
|
||||
break;
|
||||
if( STRUCT->HitTest( aPosRef ) )
|
||||
{
|
||||
|
|
|
@ -498,14 +498,14 @@ void AddMenusForJunction( wxMenu* PopMenu, SCH_JUNCTION* Junction, SCH_EDIT_FRAM
|
|||
if( !is_new )
|
||||
{
|
||||
if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(),
|
||||
WIREITEM | BUSITEM | EXCLUDE_WIRE_BUS_ENDPOINTS ) )
|
||||
WIRE_T | BUS_T | EXCLUDE_ENDPOINTS_T ) )
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ), break_line_xpm );
|
||||
}
|
||||
|
||||
msg = AddHotkeyName( _( "Delete Junction" ), s_Schematic_Hokeys_Descr, HK_DELETE );
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, msg, delete_xpm );
|
||||
|
||||
if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(), WIREITEM | BUSITEM ) )
|
||||
if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(), WIRE_T | BUS_T ) )
|
||||
{
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_NODE, _( "Delete Node" ), delete_node_xpm );
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ),
|
||||
|
@ -536,7 +536,7 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
|
|||
delete_connection_xpm );
|
||||
|
||||
if( PickStruct( frame->GetScreen()->m_Curseur, frame->GetScreen(),
|
||||
WIREITEM | BUSITEM | EXCLUDE_WIRE_BUS_ENDPOINTS ) )
|
||||
WIRE_T | BUS_T | EXCLUDE_ENDPOINTS_T ) )
|
||||
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ), break_line_xpm );
|
||||
|
||||
PopMenu->AppendSeparator();
|
||||
|
|
|
@ -423,10 +423,10 @@ bool SCH_LINE::doHitTest( const wxPoint& aPoint, int aAccuracy, SCH_FILTER_T aFi
|
|||
if( !TestSegmentHit( aPoint, m_Start, m_End, aAccuracy ) )
|
||||
return false;
|
||||
|
||||
if( ( aFilter & EXCLUDE_WIRE_BUS_ENDPOINTS ) && IsEndPoint( aPoint ) )
|
||||
if( ( aFilter & EXCLUDE_ENDPOINTS_T ) && IsEndPoint( aPoint ) )
|
||||
return false;
|
||||
|
||||
if( ( aFilter & WIRE_BUS_ENDPOINTS_ONLY ) && !IsEndPoint( aPoint ) )
|
||||
if( ( aFilter & ENDPOINTS_ONLY_T ) && !IsEndPoint( aPoint ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
; General Product Description Definitions
|
||||
!define PRODUCT_NAME "KiCad"
|
||||
!define PRODUCT_VERSION "2011.01.22"
|
||||
!define PRODUCT_VERSION "2011.01.25"
|
||||
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
|
||||
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
|
||||
!define COMPANY_NAME ""
|
||||
|
|
|
@ -1133,10 +1133,10 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
|
|||
m_MessagesList->AppendToPage( msg );
|
||||
}
|
||||
|
||||
if( viadia < viadrill )
|
||||
if( viadia <= viadrill )
|
||||
{
|
||||
result = false;
|
||||
msg.Printf( _( "<b>Extra Via %d Size</b> %s < <b> Drill Size</b> %s<br>" ),
|
||||
msg.Printf( _( "<b>Extra Via %d Size</b> %s ≤ <b> Drill Size</b> %s<br>" ),
|
||||
row + 1, GetChars( tvalue ), GetChars( drlvalue ) );
|
||||
|
||||
m_MessagesList->AppendToPage( msg );
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
release version:
|
||||
2011 jan 22 (BZR 2754)
|
||||
2011 jan 25
|
||||
files (.zip,.tgz):
|
||||
kicad-2011-01-22
|
||||
kicad-2011-01-25
|
||||
|
|
Loading…
Reference in New Issue