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.
---
 pcbnew/edit.cpp        | 1 +
 pcbnew/onleftclick.cpp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp
index 694bdd519..e454d7f4d 100644
--- a/pcbnew/edit.cpp
+++ b/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;
diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp
index 0da628708..02b90fd82 100644
--- a/pcbnew/onleftclick.cpp
+++ b/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();
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to