From 9e2fc9b07cd68fc8450ef5b89ee01262ffab2472 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 21 Sep 2023 14:28:11 +0100 Subject: [PATCH] Footprint item positions are relative. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15477 --- pcbnew/dialogs/dialog_text_properties.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 120bfc8e71..bf584e8078 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -51,8 +51,16 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, PC wxString title; // Configure display origin transforms - m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD ); - m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD ); + if( m_item->GetParentFootprint() ) + { + m_posX.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD ); + m_posY.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD ); + } + else + { + m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD ); + m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD ); + } m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );