Added missing handler for 'activate' events in EDIT_TOOL
Fixes: lp:1660306 * https://bugs.launchpad.net/kicad/+bug/1660306
This commit is contained in:
parent
f0e0254e27
commit
9627f063ff
|
@ -171,19 +171,7 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
// Main loop: keep receiving events
|
// Main loop: keep receiving events
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if( evt->IsCancel() )
|
if( evt->IsAction( &COMMON_ACTIONS::editActivate )
|
||||||
{
|
|
||||||
restore = true; // Cancelling the tool means that items have to be restored
|
|
||||||
break; // Finish
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( evt->Action() == TA_UNDO_REDO_PRE )
|
|
||||||
{
|
|
||||||
unselect = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
else if( evt->IsAction( &COMMON_ACTIONS::editActivate )
|
|
||||||
|| evt->IsMotion() || evt->IsDrag( BUT_LEFT ) )
|
|| evt->IsMotion() || evt->IsDrag( BUT_LEFT ) )
|
||||||
{
|
{
|
||||||
BOARD_ITEM* curr_item = selection.Front();
|
BOARD_ITEM* curr_item = selection.Front();
|
||||||
|
@ -253,6 +241,18 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
|
m_toolMgr->RunAction( COMMON_ACTIONS::editModifiedSelection, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if( evt->IsCancel() || evt->IsActivate() )
|
||||||
|
{
|
||||||
|
restore = true; // Cancelling the tool means that items have to be restored
|
||||||
|
break; // Finish
|
||||||
|
}
|
||||||
|
|
||||||
|
else if( evt->Action() == TA_UNDO_REDO_PRE )
|
||||||
|
{
|
||||||
|
unselect = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Dispatch TOOL_ACTIONs
|
// Dispatch TOOL_ACTIONs
|
||||||
else if( evt->Category() == TC_COMMAND )
|
else if( evt->Category() == TC_COMMAND )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue