Minor change to clearing selection handling.
This commit is contained in:
parent
630a3fb1b9
commit
24ba75ba92
|
@ -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 )
|
||||||
// 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 )
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue