diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 36814e541d..5f3906e67b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -231,7 +231,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) { for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { - if( pad->ViewBBox().Contains( m_cursor ) ) + if( pad->ViewBBox().Contains( getViewControls()->GetCursorPosition() ) ) { // Turns out that user wants to edit a pad properties item = pad; diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index d3792766ff..b23f076e96 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -101,7 +101,8 @@ private: ///> Offset from the dragged item's center (anchor) wxPoint m_offset; - ///> Last cursor position + ///> Last cursor position (needed for getModificationPoint() to avoid changes + ///> of edit reference point). VECTOR2I m_cursor; ///> Removes and frees a single BOARD_ITEM.