Commit 1057d5a5 authored by Maciej Suminski's avatar Maciej Suminski

Changed reaction of SELECTION_TOOL to ToolCancel event (first event clears...

Changed reaction of SELECTION_TOOL to ToolCancel event (first event clears selection, second one deactivates the tool).
parent 6b3742b7
...@@ -72,7 +72,12 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) ...@@ -72,7 +72,12 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
m_additive = evt->Modifier( MD_ModShift ); m_additive = evt->Modifier( MD_ModShift );
if( evt->IsCancel() ) if( evt->IsCancel() )
return 0; {
if( !m_selectedItems.empty() )
clearSelection();
else
return 0;
}
// single click? Select single object // single click? Select single object
if( evt->IsClick( MB_Left ) ) if( evt->IsClick( MB_Left ) )
...@@ -242,7 +247,7 @@ void SELECTION_TOOL::selectMultiple() ...@@ -242,7 +247,7 @@ void SELECTION_TOOL::selectMultiple()
} }
BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
{ {
OPT_TOOL_EVENT evt; OPT_TOOL_EVENT evt;
BOARD_ITEM* current = NULL; BOARD_ITEM* current = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment