From 536bba294be801ae86adfc5910f4d380cf625d7c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 30 Oct 2020 17:59:04 +0100 Subject: [PATCH] Do not round a rotation angle to 0.1 degree. Also ensure the rotation angle is not truncated when displaying info for Footprints and Pads Fixes #6058 https://gitlab.com/kicad/code/kicad/issues/6058 --- pcbnew/class_module.cpp | 2 +- pcbnew/class_pad.cpp | 4 ++-- pcbnew/dialogs/dialog_move_exact.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 697832ddf4..f71e41154e 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -776,7 +776,7 @@ void MODULE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector pad_orient_degrees = NormalizeAngleDegrees( pad_orient_degrees, -180.0, +180.0 ); if( module_orient_degrees != 0.0 ) - msg.Printf( wxT( "%.2f(+ %.2f)" ), pad_orient_degrees, module_orient_degrees ); + msg.Printf( wxT( "%.4g(+ %.4g)" ), pad_orient_degrees, module_orient_degrees ); else - msg.Printf( wxT( "%.1f" ), GetOrientationDegrees() ); + msg.Printf( wxT( "%.4g" ), GetOrientationDegrees() ); aList.push_back( MSG_PANEL_ITEM( _( "Rotation" ), msg, LIGHTBLUE ) ); diff --git a/pcbnew/dialogs/dialog_move_exact.cpp b/pcbnew/dialogs/dialog_move_exact.cpp index d336e19b73..99b32a82ba 100644 --- a/pcbnew/dialogs/dialog_move_exact.cpp +++ b/pcbnew/dialogs/dialog_move_exact.cpp @@ -244,7 +244,7 @@ bool DIALOG_MOVE_EXACT::TransferDataFromWindow() bool ok = GetTranslationInIU( translation, m_polarCoords->IsChecked() ); m_translation.x = KiROUND(translation.x); m_translation.y = KiROUND(translation.y); - m_rotation = m_rotate.GetValue(); + m_rotation = m_rotate.GetDoubleValue(); m_rotationAnchor = m_menuIDs[ m_anchorOptions->GetSelection() ]; if( ok )