Some of the Tool Actions need to be run in immediate mode - fixed.
This commit is contained in:
parent
49dd416c53
commit
c1eda6b88c
|
@ -626,7 +626,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent )
|
|||
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
|
||||
|
||||
// Deselect all items
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
|
||||
getEditFrame<PCB_EDIT_FRAME>()->SetToolID( ID_TRACK_BUTT, wxCURSOR_PENCIL,
|
||||
_( "Interactive Router" ) );
|
||||
|
|
|
@ -251,7 +251,7 @@ int DRAWING_TOOL::DrawDimension( TOOL_EVENT& aEvent )
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
|
||||
|
@ -450,7 +450,7 @@ int DRAWING_TOOL::PlaceTarget( TOOL_EVENT& aEvent )
|
|||
m_view->Add( &preview );
|
||||
preview.ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->SetSnapping( true );
|
||||
m_controls->SetAutoPan( true );
|
||||
|
||||
|
@ -525,7 +525,7 @@ int DRAWING_TOOL::PlaceModule( TOOL_EVENT& aEvent )
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
m_controls->SetAutoPan( true );
|
||||
|
@ -703,7 +703,7 @@ int DRAWING_TOOL::PlaceDXF( TOOL_EVENT& aEvent )
|
|||
BOARD_ITEM* firstItem = static_cast<BOARD_ITEM*>( *preview.Begin() );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
|
||||
|
@ -877,7 +877,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic,
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic )
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
|
||||
|
@ -1212,7 +1212,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
|
||||
|
@ -1421,7 +1421,7 @@ int DRAWING_TOOL::placeTextModule()
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
m_controls->SetAutoPan( true );
|
||||
|
@ -1539,7 +1539,7 @@ int DRAWING_TOOL::placeTextPcb()
|
|||
KIGFX::VIEW_GROUP preview( m_view );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
m_controls->SetAutoPan( true );
|
||||
|
|
|
@ -181,7 +181,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
selection.group->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
|
||||
}
|
||||
|
||||
else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) )
|
||||
|
@ -205,7 +205,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
if( unselect )
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
|
||||
RN_DATA* ratsnest = getModel<BOARD>()->GetRatsnest();
|
||||
ratsnest->ClearSimple();
|
||||
|
@ -278,7 +278,7 @@ int EDIT_TOOL::Properties( TOOL_EVENT& aEvent )
|
|||
getModel<BOARD>()->GetRatsnest()->Recalculate();
|
||||
item->ViewUpdate();
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
|
||||
}
|
||||
|
||||
item->SetFlags( flags );
|
||||
|
@ -335,9 +335,9 @@ int EDIT_TOOL::Rotate( TOOL_EVENT& aEvent )
|
|||
getModel<BOARD>()->GetRatsnest()->Recalculate();
|
||||
|
||||
if( unselect )
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
|
||||
setTransitions();
|
||||
|
||||
return 0;
|
||||
|
@ -389,9 +389,9 @@ int EDIT_TOOL::Flip( TOOL_EVENT& aEvent )
|
|||
getModel<BOARD>()->GetRatsnest()->Recalculate();
|
||||
|
||||
if( unselect )
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::pointEditorUpdate, true );
|
||||
setTransitions();
|
||||
|
||||
return 0;
|
||||
|
@ -414,7 +414,7 @@ int EDIT_TOOL::Remove( TOOL_EVENT& aEvent )
|
|||
PCB_BASE_FRAME* editFrame = getEditFrame<PCB_BASE_FRAME>();
|
||||
|
||||
// As we are about to remove items, they have to be removed from the selection first
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
|
||||
// Save them
|
||||
for( unsigned int i = 0; i < selectedItems.GetCount(); ++i )
|
||||
|
|
|
@ -258,7 +258,7 @@ int MODULE_TOOLS::EnumeratePads( TOOL_EVENT& aEvent )
|
|||
|
||||
Activate();
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
|
||||
while( OPT_TOOL_EVENT evt = Wait() )
|
||||
|
@ -433,7 +433,7 @@ int MODULE_TOOLS::PasteItems( TOOL_EVENT& aEvent )
|
|||
preview.Add( pastedModule );
|
||||
m_view->Add( &preview );
|
||||
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear );
|
||||
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
|
||||
m_controls->ShowCursor( true );
|
||||
m_controls->SetSnapping( true );
|
||||
m_controls->SetAutoPan( true );
|
||||
|
|
Loading…
Reference in New Issue