Commit 24ba75ba authored by Maciej Suminski's avatar Maciej Suminski

Minor change to clearing selection handling.

parent 630a3fb1
...@@ -94,7 +94,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) ...@@ -94,7 +94,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
if( evt->IsCancel() ) if( evt->IsCancel() )
{ {
if( !m_selection.Empty() ) // Cancel event deselects items... // Cancel event deselects items...
ClearSelection(); ClearSelection();
// This tool never exits // This tool never exits
...@@ -109,7 +109,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) ...@@ -109,7 +109,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
// single click? Select single object // single click? Select single object
else if( evt->IsClick( BUT_LEFT ) ) else if( evt->IsClick( BUT_LEFT ) )
{ {
if( !m_additive && m_selection.Size() > 1 ) if( !m_additive )
ClearSelection(); ClearSelection();
selectSingle( evt->Position() ); selectSingle( evt->Position() );
...@@ -159,6 +159,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) ...@@ -159,6 +159,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
void SELECTION_TOOL::ClearSelection() void SELECTION_TOOL::ClearSelection()
{ {
if( m_selection.Empty() )
return;
KIGFX::VIEW_GROUP::const_iter it, it_end; KIGFX::VIEW_GROUP::const_iter it, it_end;
// Restore the initial properties // Restore the initial properties
......
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