Symbol editor: ensure a new derived symbol has the correct DeMorgan option displayed.
Derived symbols use the same graphics as their parent, so ensure the parent is used to enable/disable the DeMorgan option and tool in toolbar Fixes #13739 https://gitlab.com/kicad/code/kicad/-/issues/13739
This commit is contained in:
parent
e55263be00
commit
5596790a6e
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||||
* Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2004-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -457,7 +457,11 @@ void SYMBOL_EDIT_FRAME::CreateNewSymbol()
|
||||||
|
|
||||||
// must be called after loadSymbol, that calls SetShowDeMorgan, but
|
// must be called after loadSymbol, that calls SetShowDeMorgan, but
|
||||||
// because the symbol is empty,it looks like it has no alternate body
|
// because the symbol is empty,it looks like it has no alternate body
|
||||||
SetShowDeMorgan( dlg.GetAlternateBodyStyle() );
|
// and a derived symbol inherits its parent body.
|
||||||
|
if( !new_symbol.GetParent().lock() )
|
||||||
|
SetShowDeMorgan( dlg.GetAlternateBodyStyle() );
|
||||||
|
else
|
||||||
|
SetShowDeMorgan( new_symbol.HasConversion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue