Minor SELECTION_TOOL fixes.
This commit is contained in:
parent
c007e308f8
commit
dd5275f6c6
|
@ -120,7 +120,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
|
|||
// different combination
|
||||
if( it == m_actionHotKeys.end() )
|
||||
{
|
||||
it = m_actionHotKeys.find( key | (mod & ~MD_SHIFT) );
|
||||
it = m_actionHotKeys.find( key | ( mod & ~MD_SHIFT ) );
|
||||
|
||||
if( it == m_actionHotKeys.end() )
|
||||
return false; // no appropriate action found for the hotkey
|
||||
|
|
|
@ -220,7 +220,7 @@ private:
|
|||
{
|
||||
const SELECTION& selection = m_selectionTool->GetSelection();
|
||||
|
||||
if( selection.items.GetCount() > 1 )
|
||||
if( selection.items.GetCount() != 1 )
|
||||
return NULL;
|
||||
|
||||
BOARD_ITEM* item = selection.Item<BOARD_ITEM>( 0 );
|
||||
|
|
|
@ -1325,16 +1325,8 @@ bool SELECTION_TOOL::SanitizeSelection()
|
|||
}
|
||||
}
|
||||
|
||||
while( !rejected.empty () )
|
||||
{
|
||||
BOARD_ITEM* item = *rejected.begin();
|
||||
int itemIdx = m_selection.items.FindItem( item );
|
||||
|
||||
if( itemIdx >= 0 )
|
||||
m_selection.items.RemovePicker( itemIdx );
|
||||
|
||||
rejected.erase( item );
|
||||
}
|
||||
BOOST_FOREACH( BOARD_ITEM* item, rejected )
|
||||
unselect( item );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue