pcbnew: Fix persistent multiple items selection box that stays after selecting a polygon/line (GAL).

This commit is contained in:
Maciej Suminski 2014-11-13 14:11:26 +01:00
parent d54675b56b
commit 1855db5493
2 changed files with 3 additions and 3 deletions

View File

@ -308,6 +308,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent )
controls->SetAutoPan( false ); controls->SetAutoPan( false );
setAltConstraint( false ); setAltConstraint( false );
modified = false; modified = false;
m_toolMgr->PassEvent();
} }
else if( evt->IsCancel() ) else if( evt->IsCancel() )

View File

@ -348,9 +348,6 @@ bool SELECTION_TOOL::selectMultiple()
if( evt->IsMouseUp( BUT_LEFT ) ) if( evt->IsMouseUp( BUT_LEFT ) )
{ {
// End drawing the selection box
m_selArea->ViewSetVisible( false );
// Mark items within the selection box as selected // Mark items within the selection box as selected
std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> selectedItems; std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> selectedItems;
BOX2I selectionBox = m_selArea->ViewBBox(); BOX2I selectionBox = m_selArea->ViewBBox();
@ -384,6 +381,8 @@ bool SELECTION_TOOL::selectMultiple()
} }
} }
// Stop drawing the selection box
m_selArea->ViewSetVisible( false );
view->Remove( m_selArea ); view->Remove( m_selArea );
m_multiple = false; // Multiple selection mode is inactive m_multiple = false; // Multiple selection mode is inactive
getViewControls()->SetAutoPan( false ); getViewControls()->SetAutoPan( false );