diff --git a/common/tool/zoom_menu.cpp b/common/tool/zoom_menu.cpp index e2c711ca41..07c69ba495 100644 --- a/common/tool/zoom_menu.cpp +++ b/common/tool/zoom_menu.cpp @@ -63,7 +63,7 @@ void ZOOM_MENU::update() const std::vector& zoomList = m_parent->config()->m_Window.zoom_factors; - for( int i = 0; i < zoomList.size(); ++i ) + for( size_t i = 0; i < zoomList.size(); ++i ) { // Search for a value near the current zoom setting: double rel_error = std::fabs( zoomList[i] - zoom ) / zoom; diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 9ee1b9c428..67a739ad60 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -253,11 +253,17 @@ void D_PAD::BuildEffectiveShapes() const break; case PAD_SHAPE_RECT: - if( (int) m_Orient % 900 == 0 ) + if( m_Orient == 0 || m_Orient == 1800 ) { add( new SHAPE_RECT( shapePos - m_Size / 2, m_Size.x, m_Size.y ) ); break; } + else if( m_Orient == 900 || m_Orient == -900 ) + { + wxSize rot_size( m_Size.y, m_Size.x ); + add( new SHAPE_RECT( shapePos - rot_size / 2, rot_size.x, rot_size.y ) ); + break; + } // Not at a cartesian angle; fall through to general case KI_FALLTHROUGH;