Browse Source

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.
pull/7/merge
Simon Richter 8 years ago
committed by Maciej Suminski
parent
commit
d41af7db7d
  1. 1
      pcbnew/edit.cpp
  2. 1
      pcbnew/onleftclick.cpp

1
pcbnew/edit.cpp

@ -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;

1
pcbnew/onleftclick.cpp

@ -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();

Loading…
Cancel
Save