Kick the selection tool to activate (and thus update cursors) on exiting some picker tools

This commit is contained in:
Marek Roszko 2020-10-11 13:12:13 -04:00
parent 57da733f56
commit 03074ae6ed
5 changed files with 18 additions and 0 deletions

View File

@ -362,6 +362,9 @@ int LIB_EDIT_TOOL::DeleteItemCursor( const TOOL_EVENT& aEvent )
{
if( m_pickerItem )
m_toolMgr->GetTool<EE_SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
// Wake the selection tool after exiting to ensure the cursor gets updated
m_toolMgr->RunAction( EE_ACTIONS::selectionActivate, false );
} );
m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );

View File

@ -1167,6 +1167,9 @@ int SCH_EDIT_TOOL::DeleteItemCursor( const TOOL_EVENT& aEvent )
{
if( m_pickerItem )
m_toolMgr->GetTool<EE_SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
// Wake the selection tool after exiting to ensure the cursor gets updated
m_toolMgr->RunAction( EE_ACTIONS::selectionActivate, false );
} );
m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );

View File

@ -730,6 +730,9 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent )
TOOL_EVENT dummyEvent;
UpdateNetHighlighting( dummyEvent );
}
// Wake the selection tool after exiting to ensure the cursor gets updated
m_toolMgr->RunAction( EE_ACTIONS::selectionActivate, false );
} );
std::string tool = aEvent.GetCommandStr().get();
@ -804,6 +807,9 @@ int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent )
{
if( m_pickerItem )
m_toolMgr->GetTool<EE_SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
// Wake the selection tool after exiting to ensure the cursor gets updated
m_toolMgr->RunAction( EE_ACTIONS::selectionActivate, false );
} );
std::string tool = aEvent.GetCommandStr().get();

View File

@ -405,6 +405,9 @@ int PL_EDIT_TOOL::DeleteItemCursor( const TOOL_EVENT& aEvent )
{
if( m_pickerItem )
m_toolMgr->GetTool<PL_SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
// Wake the selection tool after exiting to ensure the cursor gets updated
m_toolMgr->RunAction( PL_ACTIONS::selectionActivate, false );
} );
m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );

View File

@ -526,6 +526,9 @@ int PCBNEW_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent )
{
if( m_pickerItem )
m_toolMgr->GetTool<SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );
// Wake the selection tool after exiting to ensure the cursor gets updated
m_toolMgr->RunAction( PCB_ACTIONS::selectionActivate, false );
} );
m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );