← Back to team overview

kicad-developers team mailing list archive

Re: Unable to delete tracks

 

On Tue, May 06, 2014 at 06:22:36PM +1200, Blair Bonnett wrote:
> Bisection showed the problem was indeed introduced in revision 4844.

The dreaded virtual splice. Forgot *one* const, so the compiler decided
to create a new member slot. Too bad that C++ by design can't warn for
that (since it's not mandatory to declare virtual)

Since bzr doesn't work behind a proxy I can't commit till tonight. In
the meantime this is the fix

=== modified file 'pcbnew/class_track.cpp'
--- pcbnew/class_track.cpp      2014-05-04 17:08:36 +0000
+++ pcbnew/class_track.cpp      2014-05-06 06:52:01 +0000
@@ -1231,7 +1231,7 @@
 }
 
 
-bool TRACK::HitTest( const wxPoint& aPosition )
+bool TRACK::HitTest( const wxPoint& aPosition ) const
 {
     return TestSegmentHit( aPosition, m_Start, m_End, m_Width / 2 );
 }

=== modified file 'pcbnew/class_track.h'
--- pcbnew/class_track.h        2014-05-04 17:08:36 +0000
+++ pcbnew/class_track.h        2014-05-06 06:22:05 +0000
@@ -223,7 +223,7 @@
                          const KICAD_T scanTypes[] );
 
 
-    virtual bool HitTest( const wxPoint& aPosition );
+    virtual bool HitTest( const wxPoint& aPosition ) const;
 
     /** @copydoc BOARD_ITEM::HitTest(const EDA_RECT& aRect,
      *                               bool aContained = true, int aAccuracy ) const


Sorry for the inconvenience

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References