From 980e325ba13750184247ce7606ab9162a1f2363e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Feb 2014 14:21:29 +0100 Subject: [PATCH] Edit tool may still be activated if it was invoked with no selected items. --- pcbnew/tools/edit_tool.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 451164bf23..812d7732dd 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -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;