Edit tool may still be activated if it was invoked with no selected items.

This commit is contained in:
Maciej Suminski 2014-02-04 14:21:29 +01:00
parent 347649e855
commit 106fa9bbd8
1 changed files with 5 additions and 1 deletions

View File

@ -80,7 +80,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
m_updateFlag = KIGFX::VIEW_ITEM::GEOMETRY;
if( selection.Empty() )
return 0; // there are no items to operate on
{
setTransitions(); // this is necessary, so later the tool may
// be activated upon reception of the activation event
return 0; // there are no items to operate on, so we can end now
}
VECTOR2D dragPosition; // The last position of the cursor while dragging
m_dragging = false;