diff --git a/common/eda_text.cpp b/common/eda_text.cpp index c615f67b26..a841158048 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -35,9 +35,9 @@ // Conversion to application internal units defined at build time. #if defined( PCBNEW ) - #include + #include // for FMT_IU #elif defined( EESCHEMA ) - #include + #include // for FMT_IU #elif defined( GERBVIEW ) #elif defined( PL_EDITOR ) #include diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index 6a7c2e71fe..3f1983be93 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -132,7 +132,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) bool valExist = false; // try to find component in existing list - for( iter = list.begin(); iter != list.end(); iter++ ) + for( iter = list.begin(); iter != list.end(); ++iter ) { cmp* current = *iter; diff --git a/pcbnew/class_board_design_settings.cpp b/pcbnew/class_board_design_settings.cpp index 6e11716155..f65999430a 100644 --- a/pcbnew/class_board_design_settings.cpp +++ b/pcbnew/class_board_design_settings.cpp @@ -242,7 +242,7 @@ int BOARD_DESIGN_SETTINGS::GetBiggestClearanceValue() int clearance = m_NetClasses.GetDefault()->GetClearance(); //Read list of Net Classes - for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) + for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); ++nc ) { NETCLASSPTR netclass = nc->second; clearance = std::max( clearance, netclass->GetClearance() ); @@ -257,7 +257,7 @@ int BOARD_DESIGN_SETTINGS::GetSmallestClearanceValue() int clearance = m_NetClasses.GetDefault()->GetClearance(); //Read list of Net Classes - for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); nc++ ) + for( NETCLASSES::const_iterator nc = m_NetClasses.begin(); nc != m_NetClasses.end(); ++nc ) { NETCLASSPTR netclass = nc->second; clearance = std::min( clearance, netclass->GetClearance() ); diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 0dea8191f0..1ba2ddc390 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -145,9 +145,7 @@ MODULE::MODULE( const MODULE& aModule ) : if( item->GetShape3DName().IsEmpty() ) // do not copy empty shapes. continue; - S3D_MASTER* t3d = m_3D_Drawings; - - t3d = new S3D_MASTER( this ); + S3D_MASTER* t3d = new S3D_MASTER( this ); t3d->Copy( item ); m_3D_Drawings.PushBack( t3d ); } diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 48747bce1e..f77d9df8d7 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -120,10 +120,10 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode, DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)frame->GetDisplayOptions(); PCB_SCREEN* screen = frame->GetScreen(); - if( displ_opts->m_DisplayPadFill == FILLED ) - drawInfo.m_ShowPadFilled = true; - else + if( displ_opts && displ_opts->m_DisplayPadFill == SKETCH ) drawInfo.m_ShowPadFilled = false; + else + drawInfo.m_ShowPadFilled = true; EDA_COLOR_T color = BLACK; if( m_layerMask[F_Cu] ) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index d4c25cdd69..c09049d7a2 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1516,8 +1516,14 @@ void PCB_EDIT_FRAME::moveExact() { BOARD_ITEM* item = GetScreen()->GetCurItem(); + // When a pad is modified, the full footprint is saved + BOARD_ITEM* itemToSave = item; + + if( item->Type() == PCB_PAD_T ) + itemToSave = item->GetParent(); + // Could be moved or rotated - SaveCopyInUndoList( item, UR_CHANGED ); + SaveCopyInUndoList( itemToSave, UR_CHANGED ); item->Move( translation ); item->Rotate( item->GetPosition(), rotation ); diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index 0ce4575905..04c7f9bd70 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -361,9 +361,9 @@ bool EXCELLON_WRITER::GenDrillReportFile( const wxString& aFullFileName ) } if( gen_NPTH_holes ) - sprintf( line, "\nTotal unplated holes count %d\n\n\n", totalHoleCount ); + sprintf( line, "\nTotal unplated holes count %u\n\n\n", totalHoleCount ); else - sprintf( line, "\nTotal plated holes count %d\n\n\n", totalHoleCount ); + sprintf( line, "\nTotal plated holes count %u\n\n\n", totalHoleCount ); fputs( line, m_file ); diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index f4477d4432..b1a322026b 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -91,8 +91,7 @@ void PCB_EDIT_FRAME::CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumbe GeneralControl( aDC, tPosition ); for( std::list::iterator i = m_Macros[aNumber].m_Record.begin(); - i != m_Macros[aNumber].m_Record.end(); - i++ ) + i != m_Macros[aNumber].m_Record.end(); ++i ) { wxPoint tmpPos = GetNearestGridPosition( tPosition + i->m_Position ); diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index d9ffbbf63b..ca06838430 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -447,7 +447,7 @@ void DXF2BRD_CONVERTER::addHeader( const DRW_Header* data ) { std::map::const_iterator it; - for( it = data->vars.begin(); it != data->vars.end(); it++ ) + for( it = data->vars.begin(); it != data->vars.end(); ++it ) { std::string key = ( (*it).first ).c_str(); diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 4fbc8ca63a..3f6553b1de 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -238,9 +238,9 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->AddSeparator(); msg = AddHotkeyName( HELP_UNDO, g_Board_Editor_Hokeys_Descr, HK_UNDO, IS_COMMENT ); - m_mainToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), HELP_UNDO ); + m_mainToolBar->AddTool( wxID_UNDO, wxEmptyString, KiBitmap( undo_xpm ), msg ); msg = AddHotkeyName( HELP_REDO, g_Board_Editor_Hokeys_Descr, HK_REDO, IS_COMMENT ); - m_mainToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), HELP_REDO ); + m_mainToolBar->AddTool( wxID_REDO, wxEmptyString, KiBitmap( redo_xpm ), msg ); m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( wxID_PRINT, wxEmptyString, KiBitmap( print_button_xpm ),