Fix bugs in new wire/line-width split.
If Symbol Editor isn't open then Eeschema needs to read in the default line width. Symbol Editor was failing to write line width parameter back to properties. Fixes: lp:1835051 * https://bugs.launchpad.net/kicad/+bug/1835051
This commit is contained in:
parent
9460f207f5
commit
ef03afe289
|
@ -105,7 +105,7 @@ void SetDefaultTextSize( int aTextSize )
|
||||||
* Default line (in Eeschema units) thickness used to draw/plot items having a
|
* Default line (in Eeschema units) thickness used to draw/plot items having a
|
||||||
* default thickness line value (i.e. = 0 ).
|
* default thickness line value (i.e. = 0 ).
|
||||||
*/
|
*/
|
||||||
static int s_drawDefaultLineThickness = DEFAULTDRAWLINETHICKNESS;
|
static int s_drawDefaultLineThickness = -1;
|
||||||
|
|
||||||
|
|
||||||
int GetDefaultLineThickness()
|
int GetDefaultLineThickness()
|
||||||
|
@ -350,14 +350,24 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
||||||
|
|
||||||
wxConfigLoadSetups( aCfg, GetConfigurationSettings() );
|
wxConfigLoadSetups( aCfg, GetConfigurationSettings() );
|
||||||
|
|
||||||
|
// LibEdit owns this one, but we must read it in if LibEdit hasn't set it yet
|
||||||
|
if( GetDefaultLineThickness() < 0 )
|
||||||
|
{
|
||||||
|
SetDefaultLineThickness( (int) aCfg->Read( DefaultDrawLineWidthEntry,
|
||||||
|
DEFAULTDRAWLINETHICKNESS ) );
|
||||||
|
}
|
||||||
|
|
||||||
SetDefaultBusThickness( (int) aCfg->Read( DefaultBusWidthEntry, DEFAULTBUSTHICKNESS ) );
|
SetDefaultBusThickness( (int) aCfg->Read( DefaultBusWidthEntry, DEFAULTBUSTHICKNESS ) );
|
||||||
|
|
||||||
|
// Property introduced in 6.0; use DefaultLineWidth for earlier projects
|
||||||
if( !aCfg->Read( DefaultWireWidthEntry, &tmp ) )
|
if( !aCfg->Read( DefaultWireWidthEntry, &tmp ) )
|
||||||
aCfg->Read( DefaultDrawLineWidthEntry, &tmp, DEFAULTDRAWLINETHICKNESS );
|
aCfg->Read( DefaultDrawLineWidthEntry, &tmp, DEFAULTDRAWLINETHICKNESS );
|
||||||
|
|
||||||
SetDefaultWireThickness( tmp );
|
SetDefaultWireThickness( (int) tmp );
|
||||||
|
|
||||||
|
if( aCfg->Read( DefaultJctSizeEntry, &tmp ) )
|
||||||
|
SCH_JUNCTION::SetSymbolSize( (int) tmp );
|
||||||
|
|
||||||
SCH_JUNCTION::SetSymbolSize( (int) aCfg->Read( DefaultJctSizeEntry, SCH_JUNCTION::GetSymbolSize() ) );
|
|
||||||
aCfg->Read( MoveWarpsCursorEntry, &m_moveWarpsCursor, true );
|
aCfg->Read( MoveWarpsCursorEntry, &m_moveWarpsCursor, true );
|
||||||
aCfg->Read( MoveTakesCursorAsOriginEntry, &m_moveTakesCursorAsOrigin, false );
|
aCfg->Read( MoveTakesCursorAsOriginEntry, &m_moveTakesCursorAsOrigin, false );
|
||||||
aCfg->Read( DragActionIsMoveEntry, &m_dragActionIsMove, true );
|
aCfg->Read( DragActionIsMoveEntry, &m_dragActionIsMove, true );
|
||||||
|
@ -535,6 +545,7 @@ void LIB_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
||||||
{
|
{
|
||||||
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
||||||
|
|
||||||
|
aCfg->Write( DefaultDrawLineWidthEntry, GetDefaultLineThickness() );
|
||||||
aCfg->Write( DefaultPinLengthEntry, GetDefaultPinLength() );
|
aCfg->Write( DefaultPinLengthEntry, GetDefaultPinLength() );
|
||||||
aCfg->Write( defaultPinNumSizeEntry, GetPinNumDefaultSize() );
|
aCfg->Write( defaultPinNumSizeEntry, GetPinNumDefaultSize() );
|
||||||
aCfg->Write( defaultPinNameSizeEntry, GetPinNameDefaultSize() );
|
aCfg->Write( defaultPinNameSizeEntry, GetPinNameDefaultSize() );
|
||||||
|
|
Loading…
Reference in New Issue