From 7e60cc530af90502c61d3c38331b7544b834bc47 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Dec 2013 11:07:30 +0100 Subject: [PATCH] Comments. --- pcbnew/tools/edit_tool.cpp | 7 +++---- pcbnew/tools/edit_tool.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index c6f46071d5..f790ca1679 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -238,15 +238,15 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent ) // Get a copy of the selected items set std::set selectedItems = m_selectionTool->GetSelection().items; - // As we are about to remove items, they have to be removed from the selection + // As we are about to remove items, they have to be removed from the selection first m_selectionTool->ClearSelection(); std::set::iterator it; for( it = selectedItems.begin(); it != selectedItems.end(); ++it ) remove( *it ); - BOARD* board = getModel( PCB_T ); // Rebuild list of pads and nets if necessary + BOARD* board = getModel( PCB_T ); if( !( board->GetStatus() & NET_CODES_OK ) ) board->BuildListOfNets(); @@ -276,10 +276,9 @@ void EDIT_TOOL::remove( BOARD_ITEM* aItem ) getView()->Remove( &module->Reference() ); getView()->Remove( &module->Value() ); - // Module itself is deleted after the switch scope + // Module itself is deleted after the switch scope is finished // list of pads is rebuild by BOARD::BuildListOfNets() -// module->ClearFlags(); // TODO is it necessary? clearing ratsnest/list of pads? // Clear flags to indicate, that the ratsnest, list of nets & pads are not valid anymore board->m_Status_Pcb = 0; } diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 3f823eff7d..2e60a21fa3 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -102,6 +102,7 @@ private: ///> Flag determining if anything is being dragged right now bool m_dragging; + ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); ///> Sets up handlers for various events