Commit d84087c0 authored by charras's avatar charras

eeschema: minor bug fix

parent a46cd46d
...@@ -148,8 +148,7 @@ void WinEDA_SchematicFrame::TestDanglingEnds( SCH_ITEM* DrawList, wxDC* DC ) ...@@ -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, ...@@ -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;
......
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