Force schematic symbol pin update when reverting a commit.
Apparently somewhere in our schematic code base we are allowing pins to be added to symbols without correct setting the parent symbol object. This causes all kinds of issues when the pin's parent object need to be accessed. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16846
This commit is contained in:
parent
ae9175927b
commit
b409aee28a
|
@ -527,6 +527,15 @@ void SCH_COMMIT::Revert()
|
||||||
// This must be called before any calls that require stable object pointers.
|
// This must be called before any calls that require stable object pointers.
|
||||||
screen->Update( item );
|
screen->Update( item );
|
||||||
|
|
||||||
|
// This hack is to prevent incorrectly parented symbol pins from breaking the
|
||||||
|
// connectivity algorithm.
|
||||||
|
if( item->Type() == SCH_SYMBOL_T )
|
||||||
|
{
|
||||||
|
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||||
|
wxCHECK2( symbol, continue );
|
||||||
|
symbol->UpdatePins();
|
||||||
|
}
|
||||||
|
|
||||||
item->SetConnectivityDirty();
|
item->SetConnectivityDirty();
|
||||||
|
|
||||||
if( view )
|
if( view )
|
||||||
|
|
Loading…
Reference in New Issue