Fix misc build warnings
This removes unused static function in page layout editor, unused variable in pcb_painter and restors the gcc unitialized fix for pcbnew's drawing_tool.
This commit is contained in:
parent
69b31eb88d
commit
9460f207f5
|
@ -335,22 +335,6 @@ int PL_EDIT_TOOL::DoDelete( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool deleteItem( PL_EDITOR_FRAME* aFrame, const VECTOR2D& aPosition )
|
|
||||||
{
|
|
||||||
PL_SELECTION_TOOL* selectionTool = aFrame->GetToolManager()->GetTool<PL_SELECTION_TOOL>();
|
|
||||||
wxCHECK( selectionTool, false );
|
|
||||||
|
|
||||||
aFrame->GetToolManager()->RunAction( PL_ACTIONS::clearSelection, true );
|
|
||||||
|
|
||||||
EDA_ITEM* item = selectionTool->SelectPoint( aPosition );
|
|
||||||
|
|
||||||
if( item )
|
|
||||||
aFrame->GetToolManager()->RunAction( PL_ACTIONS::doDelete, true );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define HITTEST_THRESHOLD_PIXELS 5
|
#define HITTEST_THRESHOLD_PIXELS 5
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -603,7 +603,6 @@ void PCB_PAINTER::draw( const VIA* aVia, int aLayer )
|
||||||
|
|
||||||
void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
||||||
{
|
{
|
||||||
PAD_SHAPE_T shape;
|
|
||||||
double m, n;
|
double m, n;
|
||||||
double orientation = aPad->GetOrientation();
|
double orientation = aPad->GetOrientation();
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ int DRAWING_TOOL::DrawLine( const TOOL_EVENT& aEvent )
|
||||||
DRAWSEGMENT* line = m_editModules ? new EDGE_MODULE( module ) : new DRAWSEGMENT;
|
DRAWSEGMENT* line = m_editModules ? new EDGE_MODULE( module ) : new DRAWSEGMENT;
|
||||||
BOARD_COMMIT commit( m_frame );
|
BOARD_COMMIT commit( m_frame );
|
||||||
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::LINE );
|
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::LINE );
|
||||||
OPT<VECTOR2D> startingPoint = NULLOPT;
|
OPT<VECTOR2D> startingPoint = boost::make_optional<VECTOR2D>( false, VECTOR2D( 0, 0 ) );
|
||||||
|
|
||||||
line->SetFlags( IS_NEW );
|
line->SetFlags( IS_NEW );
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ int DRAWING_TOOL::DrawCircle( const TOOL_EVENT& aEvent )
|
||||||
DRAWSEGMENT* circle = m_editModules ? new EDGE_MODULE( module ) : new DRAWSEGMENT;
|
DRAWSEGMENT* circle = m_editModules ? new EDGE_MODULE( module ) : new DRAWSEGMENT;
|
||||||
BOARD_COMMIT commit( m_frame );
|
BOARD_COMMIT commit( m_frame );
|
||||||
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::CIRCLE );
|
SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::CIRCLE );
|
||||||
OPT<VECTOR2D> startingPoint = NULLOPT;
|
OPT<VECTOR2D> startingPoint = boost::make_optional<VECTOR2D>( false, VECTOR2D( 0, 0 ) );
|
||||||
|
|
||||||
circle->SetFlags( IS_NEW );
|
circle->SetFlags( IS_NEW );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue