PL editor: Add ( missing in commit 0d903d43) test for invalid parameter.

This commit is contained in:
jean-pierre charras 2023-02-08 08:38:31 +01:00
parent b71fa91bc4
commit ddd4178c62
1 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013 CERN
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021-2023 KiCad Developers, see AUTHORS.txt for contributors.
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
*
* This program is free software; you can redistribute it and/or
@ -180,11 +180,13 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToGeneral()
DS_DATA_MODEL& model = DS_DATA_MODEL::GetTheInstance();
// Import default parameters from widgets
m_defaultLineWidth.Validate( 0.0, 10.0, EDA_UNITS::MILLIMETRES );
model.m_DefaultLineWidth = EDA_UNIT_UTILS::UI::ToUserUnit( drawSheetIUScale, units,
bool is_valid = m_defaultLineWidth.Validate( 0.0, 10.0, EDA_UNITS::MILLIMETRES );
if( is_valid )
model.m_DefaultLineWidth = EDA_UNIT_UTILS::UI::ToUserUnit( drawSheetIUScale, units,
m_defaultLineWidth.GetValue() );
bool is_valid = m_defaultTextSizeX.Validate( DLG_MIN_TEXTSIZE, DLG_MAX_TEXTSIZE,
is_valid = m_defaultTextSizeX.Validate( DLG_MIN_TEXTSIZE, DLG_MAX_TEXTSIZE,
EDA_UNITS::MILLIMETRES );
if( is_valid )
model.m_DefaultTextSize.x = EDA_UNIT_UTILS::UI::ToUserUnit( drawSheetIUScale, units,