Resore push/pop-less PickerTool.
(Functionality was accidentallly lost when we removed the opt command strings.)
This commit is contained in:
parent
e8762da4f4
commit
ae741b93e6
|
@ -580,6 +580,9 @@ TOOL_ACTION ACTIONS::pickerTool( "common.InteractivePicker.pickerTool",
|
|||
"", "",
|
||||
BITMAPS::INVALID_BITMAP, AF_ACTIVATE );
|
||||
|
||||
TOOL_ACTION ACTIONS::pickerSubTool( "common.InteractivePicker.pickerSubTool",
|
||||
AS_GLOBAL );
|
||||
|
||||
TOOL_ACTION ACTIONS::show3DViewer( "common.Control.show3DViewer",
|
||||
AS_GLOBAL,
|
||||
MD_ALT + '3', LEGACY_HK_NAME( "3D Viewer" ),
|
||||
|
|
|
@ -156,6 +156,7 @@ public:
|
|||
static TOOL_ACTION selectionTool;
|
||||
static TOOL_ACTION measureTool;
|
||||
static TOOL_ACTION pickerTool;
|
||||
static TOOL_ACTION pickerSubTool;
|
||||
|
||||
// Misc
|
||||
static TOOL_ACTION show3DViewer;
|
||||
|
|
|
@ -2141,8 +2141,7 @@ bool EDIT_TOOL::pickReferencePoint( const wxString& aTooltip, const wxString& aS
|
|||
m_statusPopup->Popup();
|
||||
canvas()->SetStatusPopup( m_statusPopup->GetPanel() );
|
||||
|
||||
std::string tool = "";
|
||||
m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );
|
||||
m_toolMgr->RunAction( ACTIONS::pickerSubTool, true );
|
||||
|
||||
while( !done )
|
||||
{
|
||||
|
|
|
@ -43,6 +43,7 @@ int PCB_PICKER_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
PCB_GRID_HELPER grid( m_toolMgr, frame->GetMagneticItemsSettings() );
|
||||
int finalize_state = WAIT_CANCEL;
|
||||
|
||||
if( aEvent.IsAction( &ACTIONS::pickerTool ) )
|
||||
frame->PushTool( aEvent );
|
||||
|
||||
Activate();
|
||||
|
@ -170,18 +171,13 @@ int PCB_PICKER_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
controls->ForceCursorPosition( false );
|
||||
controls->ShowCursor( false );
|
||||
|
||||
if( aEvent.IsAction( &ACTIONS::pickerTool ) )
|
||||
frame->PopTool( aEvent );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void PCB_PICKER_TOOL::setTransitions()
|
||||
{
|
||||
Go( &PCB_PICKER_TOOL::Main, ACTIONS::pickerTool.MakeEvent() );
|
||||
}
|
||||
|
||||
|
||||
void PCB_PICKER_TOOL::reset()
|
||||
{
|
||||
m_layerMask = LSET::AllLayersMask();
|
||||
|
@ -196,3 +192,12 @@ void PCB_PICKER_TOOL::setControls()
|
|||
controls->CaptureCursor( false );
|
||||
controls->SetAutoPan( false );
|
||||
}
|
||||
|
||||
|
||||
void PCB_PICKER_TOOL::setTransitions()
|
||||
{
|
||||
Go( &PCB_PICKER_TOOL::Main, ACTIONS::pickerTool.MakeEvent() );
|
||||
Go( &PCB_PICKER_TOOL::Main, ACTIONS::pickerSubTool.MakeEvent() );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue