From 2ee890d74b39d1d6ffc6a1ccde218c53909cac0d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 11:59:24 +0200 Subject: [PATCH] Minor changes. --- include/tool/coroutine.h | 2 +- pcbnew/module_editor_frame.h | 4 ++-- pcbnew/tools/edit_tool.cpp | 10 +++------- pcbnew/tools/selection_tool.cpp | 1 - 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 9d502ff5c4..9daab59cb2 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -115,7 +115,7 @@ public: } /** - * * Function SetEntry() + * Function SetEntry() * * Defines the entry point for the coroutine, if not set in the constructor. */ diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index ef9687a6a3..295cce8670 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -419,7 +419,7 @@ protected: * - Place the current edited library component in Redo list * - Get old version of the current edited library component */ - void GetComponentFromUndoList( wxCommandEvent& event ); + void GetComponentFromUndoList( wxCommandEvent& aEvent ); /** * Function GetComponentFromRedoList @@ -427,7 +427,7 @@ protected: * - Place the current edited library component in undo list * - Get old version of the current edited library component */ - void GetComponentFromRedoList( wxCommandEvent& event ); + void GetComponentFromRedoList( wxCommandEvent& aEvent ); /** * Function UpdateTitle diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 85588472de..cc7e770e37 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -219,9 +219,6 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); PCB_EDIT_FRAME* editFrame = getEditFrame(); - // Shall the selection be cleared at the end? - bool unselect = selection.Empty(); - if( !makeSelection( selection ) ) { setTransitions(); @@ -238,9 +235,11 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) // Check if user wants to edit pad or module properties if( item->Type() == PCB_MODULE_T ) { + VECTOR2D cursor = getViewControls()->GetCursorPosition(); + for( D_PAD* pad = static_cast( item )->Pads(); pad; pad = pad->Next() ) { - if( pad->ViewBBox().Contains( getViewControls()->GetCursorPosition() ) ) + if( pad->ViewBBox().Contains( cursor ) ) { // Turns out that user wants to edit a pad properties item = pad; @@ -278,9 +277,6 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent ) item->SetFlags( flags ); } - if( unselect ) - m_selectionTool->ClearSelection(); - setTransitions(); return 0; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 285cbded07..0953e7f517 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -24,7 +24,6 @@ */ #include -#include #include #include