Fix issue: Symbol library editor: Moving pins jumps to origin

Also: remove outdated lines in code.

Fixes: lp:1797266
https://bugs.launchpad.net/kicad/+bug/1797266
This commit is contained in:
jean-pierre charras 2018-10-13 12:09:49 +02:00
parent 1bce69b9f0
commit 9df7626e31
1 changed files with 5 additions and 11 deletions

View File

@ -55,7 +55,6 @@ static void DrawMovePin( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi
static wxPoint OldPos;
//static wxPoint PinPreviousPos;
static ELECTRICAL_PINTYPE LastPinType = PIN_INPUT;
static int LastPinOrient = PIN_RIGHT;
static GRAPHIC_PINSHAPE LastPinShape = PINSHAPE_LINE;
@ -304,13 +303,9 @@ void LIB_EDIT_FRAME::StartMovePin( LIB_ITEM* aItem )
cur_pin->SetFlags( IS_LINKED | IS_MOVED );
//PinPreviousPos = OldPos = cur_pin->GetPosition();
startPos.x = OldPos.x;
startPos.y = -OldPos.y;
SetCrossHairPosition( startPos );
m_canvas->MoveCursorToCrossHair();
MSG_PANEL_ITEMS items;
cur_pin->GetMsgPanelInfo( m_UserUnits, items );
@ -386,7 +381,6 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC )
pin->SetConvert( LastPinCommonConvert ? 0 : m_convert );
pin->SetUnit( LastPinCommonUnit ? 0 : m_unit );
pin->SetVisible( LastPinVisible );
//PinPreviousPos = pin->GetPosition();
m_canvas->SetIgnoreMouseEvents( true );
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_EDIT_PIN );