eeschema: minor bug fix
This commit is contained in:
parent
a46cd46d9d
commit
d84087c0a1
|
@ -148,8 +148,7 @@ void WinEDA_SchematicFrame::TestDanglingEnds( SCH_ITEM* DrawList, wxDC* DC )
|
||||||
* Test if point pos is on a pin end.
|
* Test if point pos is on a pin end.
|
||||||
*
|
*
|
||||||
* @param DrawList = List of SCH_ITEMs to check.
|
* @param DrawList = List of SCH_ITEMs to check.
|
||||||
*
|
* @return a LIB_PIN pointer to the located pin or NULL if no pin was found.
|
||||||
* @return LIB_PIN - Pointer to the located pin or NULL if no pin was found.
|
|
||||||
*/
|
*/
|
||||||
LIB_PIN* WinEDA_SchematicFrame::LocatePinEnd( SCH_ITEM* DrawList,
|
LIB_PIN* WinEDA_SchematicFrame::LocatePinEnd( SCH_ITEM* DrawList,
|
||||||
const wxPoint& pos )
|
const wxPoint& pos )
|
||||||
|
@ -165,10 +164,12 @@ LIB_PIN* WinEDA_SchematicFrame::LocatePinEnd( SCH_ITEM* DrawList,
|
||||||
pinpos = Pin->m_Pos;
|
pinpos = Pin->m_Pos;
|
||||||
|
|
||||||
if( DrawLibItem == NULL )
|
if( DrawLibItem == NULL )
|
||||||
NEGATE( pinpos.y );
|
NEGATE( pinpos.y ); // In libraries Y axis is bottom to top
|
||||||
|
// and in schematic Y axis is top to bottom
|
||||||
|
|
||||||
else
|
else // calculate the pin position in schematic
|
||||||
pinpos = TransformCoordinate( DrawLibItem->m_Transform, pinpos );
|
pinpos = TransformCoordinate( DrawLibItem->m_Transform, pinpos )
|
||||||
|
+ DrawLibItem->m_Pos;
|
||||||
|
|
||||||
if( pos == pinpos )
|
if( pos == pinpos )
|
||||||
return Pin;
|
return Pin;
|
||||||
|
|
Loading…
Reference in New Issue