Legacy handling for Via tool

This tool isn't available in the Legacy canvas, but we still need to handle
the selection event and show an appropriate error message if the tool is
used.
This commit is contained in:
Simon Richter 2017-07-28 11:31:26 +02:00 committed by Maciej Suminski
parent d2860ee0ad
commit d41af7db7d
2 changed files with 2 additions and 0 deletions

View File

@ -1526,6 +1526,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
break;
// collect GAL-only tools here
case ID_PCB_DRAW_VIA_BUTT:
case ID_PCB_MEASUREMENT_TOOL:
SetToolID( id, wxCURSOR_DEFAULT, _( "Unsupported tool in this canvas" ) );
break;

View File

@ -439,6 +439,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
m_canvas->DrawGridAxis( aDC, GR_COPY, GetBoard()->GetGridOrigin() );
break;
case ID_PCB_DRAW_VIA_BUTT:
case ID_PCB_MEASUREMENT_TOOL:
DisplayError( this, _( "This tool is not available in the legacy canvas" ) );
SetNoToolSelected();