From ced5d7b4599cba20c2845831e53412fd056dd45d Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Thu, 13 Dec 2007 14:21:50 +0000 Subject: [PATCH] highlight tool HitTest()ing prefers pads over tracks --- pcbnew/surbrill.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pcbnew/surbrill.cpp b/pcbnew/surbrill.cpp index 30e155779f..f8ffaf1fb9 100644 --- a/pcbnew/surbrill.cpp +++ b/pcbnew/surbrill.cpp @@ -116,10 +116,18 @@ int WinEDA_PcbFrame::Select_High_Light( wxDC* DC ) SendMessageToEESCHEMA( item ); return g_HightLigth_NetCode; - default: + case TYPETRACK: + case TYPEVIA: + case TYPEZONE: + // since these classes are all derived from TRACK, use a common + // GetNet() function: g_HightLigth_NetCode = ((TRACK*)item)->GetNet(); Hight_Light( DC ); return g_HightLigth_NetCode; + + default: + ; // until somebody changes GENERAL_COLLECTOR::PadsOrTracks, + // this should not happen. } }