From fb590c723103ff88dd49adbe1d3ba3f7eb7b2660 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 9 Sep 2014 18:46:12 +0200 Subject: [PATCH] Fix PCB Module Editor Help Error. Remove a minor compil warning in shape_collisions.cpp --- common/geometry/shape_collisions.cpp | 15 ++++++++------- pcbnew/moduleframe.cpp | 5 +++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index 52db4ecb81..677c9e1d6f 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -61,7 +61,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aC const VECTOR2I size = aA.GetSize(); const int r = aB.GetRadius(); const int min_dist = aClearance + r; - + const VECTOR2I vts[] = { VECTOR2I( p0.x, p0.y ), @@ -107,7 +107,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aC if( !aNeedMTV ) return true; - + if( inside ) aMTV = -delta.Resize( abs( min_dist + 1 + nearest_seg_dist ) + 1 ); else @@ -152,7 +152,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, if( !aNeedMTV || !found ) return found; - + SHAPE_CIRCLE cmoved( aA ); VECTOR2I f_total( 0, 0 ); @@ -162,7 +162,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, cmoved.SetCenter( cmoved.GetCenter() + f ); f_total += f; } - + aMTV = f_total; return found; } @@ -246,13 +246,13 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeed case SH_RECT: switch( aB->Type() ) { - case SH_CIRCLE: + case SH_CIRCLE: return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); - case SH_LINE_CHAIN: + case SH_LINE_CHAIN: return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); - case SH_SEGMENT: + case SH_SEGMENT: return CollCase( aA, aB, aClearance, aNeedMTV, aMTV ); default: @@ -320,6 +320,7 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeed } bool unsupported_collision = true; + (void) unsupported_collision; // make gcc quiet assert( unsupported_collision == false ); diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 5bd7f519a4..de6a694170 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -138,6 +138,11 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_PCB_PAD_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_PCB_USER_GRID_SETUP, FOOTPRINT_EDIT_FRAME::Process_Special_Functions ) + // Menu Help + EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) + EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) + EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) + // Menu 3D Frame EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, FOOTPRINT_EDIT_FRAME::Show3D_Frame )