From d32b55f504c19f0508969ce36c3d82d66bee5386 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 24 Aug 2023 21:19:35 -0400 Subject: [PATCH] Minor cleanup after last commit --- pcbnew/dialogs/dialog_textbox_properties.cpp | 8 ++++---- pcbnew/pcb_textbox.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pcbnew/dialogs/dialog_textbox_properties.cpp b/pcbnew/dialogs/dialog_textbox_properties.cpp index 451b8f0c6e..37d4449780 100644 --- a/pcbnew/dialogs/dialog_textbox_properties.cpp +++ b/pcbnew/dialogs/dialog_textbox_properties.cpp @@ -198,7 +198,7 @@ bool DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow() STROKE_PARAMS stroke = m_textBox->GetStroke(); m_borderCheckbox->SetValue( m_textBox->IsBorderEnabled() ); - if( stroke.GetWidth() >= 0 ) + if( m_textBox->IsBorderEnabled() ) m_borderWidth.SetValue( stroke.GetWidth() ); PLOT_DASH_TYPE style = stroke.GetPlotStyle(); @@ -209,9 +209,9 @@ bool DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow() if( (int) style < (int) lineTypeNames.size() ) m_borderStyleCombo->SetSelection( (int) style ); - m_borderWidth.Enable( stroke.GetWidth() >= 0 ); - m_borderStyleLabel->Enable( stroke.GetWidth() >= 0 ); - m_borderStyleCombo->Enable( stroke.GetWidth() >= 0 ); + m_borderWidth.Enable( m_textBox->IsBorderEnabled() ); + m_borderStyleLabel->Enable( m_textBox->IsBorderEnabled() ); + m_borderStyleCombo->Enable( m_textBox->IsBorderEnabled() ); return DIALOG_TEXTBOX_PROPERTIES_BASE::TransferDataToWindow(); } diff --git a/pcbnew/pcb_textbox.cpp b/pcbnew/pcb_textbox.cpp index 9b3e574cc6..abbc24d85b 100644 --- a/pcbnew/pcb_textbox.cpp +++ b/pcbnew/pcb_textbox.cpp @@ -554,7 +554,7 @@ void PCB_TEXTBOX::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID bool PCB_TEXTBOX::IsBorderEnabled() const { - return m_stroke.GetWidth() != -1; + return m_stroke.GetWidth() >= 0; }