diff --git a/pagelayout_editor/dialogs/properties_frame.cpp b/pagelayout_editor/dialogs/properties_frame.cpp
index c272d69c47..4a6acbe741 100644
--- a/pagelayout_editor/dialogs/properties_frame.cpp
+++ b/pagelayout_editor/dialogs/properties_frame.cpp
@@ -56,7 +56,8 @@ PROPERTIES_FRAME::PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent ) :
m_textCtrlLeftMarginBinder( aParent, m_staticTextLeftMargin, m_textCtrlLeftMargin, m_TextLeftMarginUnits ),
m_textCtrlRightMarginBinder( aParent, m_staticTextDefRightMargin, m_textCtrlRightMargin, m_TextRightMarginUnits ),
m_textCtrlTopMarginBinder( aParent, m_staticTextTopMargin, m_textCtrlTopMargin, m_TextTopMarginUnits ),
- m_textCtrlBottomMarginBinder( aParent, m_staticTextBottomMargin, m_textCtrlBottomMargin, m_TextBottomMarginUnits )
+ m_textCtrlBottomMarginBinder( aParent, m_staticTextBottomMargin, m_textCtrlBottomMargin, m_TextBottomMarginUnits ),
+ m_textCtrlThicknessBinder( aParent, m_staticTextThickness, m_textCtrlThickness, m_TextLineThicknessUnits )
{
m_parent = aParent;
@@ -208,8 +209,8 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WS_DATA_ITEM* aItem )
case LT_CORNER: m_comboBoxCornerEnd->SetSelection( 1 ); break;
}
- msg.Printf( wxT("%.3f"), aItem->m_LineWidth );
- m_textCtrlThickness->SetValue( msg );
+ m_textCtrlThicknessBinder.SetDoubleValue(
+ From_User_Unit( EDA_UNITS::MILLIMETRES, aItem->m_LineWidth ) );
// Now, set prms more specific to WS_DATA_ITEM types
// For a given type, disable widgets which are not relevant,
@@ -388,8 +389,7 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( WS_DATA_ITEM* aItem )
}
// Import thickness
- msg = m_textCtrlThickness->GetValue();
- aItem->m_LineWidth = DoubleValueFromString( EDA_UNITS::UNSCALED, msg );
+ aItem->m_LineWidth = To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlThicknessBinder.GetValue() );
// Import Start point
aItem->m_Pos.m_Pos.x = To_User_Unit( EDA_UNITS::MILLIMETRES, m_textCtrlPosXBinder.GetValue() );
diff --git a/pagelayout_editor/dialogs/properties_frame.h b/pagelayout_editor/dialogs/properties_frame.h
index c544b63070..b9e2ab2ef1 100644
--- a/pagelayout_editor/dialogs/properties_frame.h
+++ b/pagelayout_editor/dialogs/properties_frame.h
@@ -72,6 +72,8 @@ class PROPERTIES_FRAME : public PANEL_PROPERTIES_BASE
UNIT_BINDER m_textCtrlTopMarginBinder;
UNIT_BINDER m_textCtrlBottomMarginBinder;
+ UNIT_BINDER m_textCtrlThicknessBinder;
+
public:
PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent );
~PROPERTIES_FRAME();
diff --git a/pagelayout_editor/dialogs/properties_frame_base.cpp b/pagelayout_editor/dialogs/properties_frame_base.cpp
index 1771dba519..9133b567c1 100644
--- a/pagelayout_editor/dialogs/properties_frame_base.cpp
+++ b/pagelayout_editor/dialogs/properties_frame_base.cpp
@@ -347,6 +347,10 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
m_textCtrlThickness = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SizerLineThickness->Add( m_textCtrlThickness, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+ m_TextLineThicknessUnits = new wxStaticText( m_swItemProperties, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_TextLineThicknessUnits->Wrap( -1 );
+ m_SizerLineThickness->Add( m_TextLineThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxBOTTOM|wxLEFT, 5 );
+
m_staticTextInfoThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Set to 0 for default"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoThickness->Wrap( -1 );
m_SizerLineThickness->Add( m_staticTextInfoThickness, 0, wxALIGN_CENTER|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
diff --git a/pagelayout_editor/dialogs/properties_frame_base.fbp b/pagelayout_editor/dialogs/properties_frame_base.fbp
index 9fd5f7d88e..04465c4c93 100644
--- a/pagelayout_editor/dialogs/properties_frame_base.fbp
+++ b/pagelayout_editor/dialogs/properties_frame_base.fbp
@@ -3287,6 +3287,67 @@
+
5
wxALIGN_CENTER|wxBOTTOM|wxRIGHT|wxLEFT
diff --git a/pagelayout_editor/dialogs/properties_frame_base.h b/pagelayout_editor/dialogs/properties_frame_base.h
index a680912997..9ac8a20497 100644
--- a/pagelayout_editor/dialogs/properties_frame_base.h
+++ b/pagelayout_editor/dialogs/properties_frame_base.h
@@ -93,6 +93,7 @@ class PANEL_PROPERTIES_BASE : public wxPanel
wxBoxSizer* m_SizerLineThickness;
wxStaticText* m_staticTextThickness;
wxTextCtrl* m_textCtrlThickness;
+ wxStaticText* m_TextLineThicknessUnits;
wxStaticText* m_staticTextInfoThickness;
wxBoxSizer* m_SizerRotation;
wxStaticText* m_staticTextRot;