From a0801e2d8e580c369f085f9f65af5e068f893a07 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 13 May 2014 11:22:51 +0200 Subject: [PATCH] Pad properties are back. --- pcbnew/tools/edit_tool.cpp | 2 +- pcbnew/tools/edit_tool.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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.