Allow selection promotion when editing wrong field type.

Also fixes a bug where a CHT_MODIFY on a parent symbol with a
selected child doesn't trigger a selection modified event.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17696

(cherry picked from commit 1aa59b806c)
This commit is contained in:
Jeff Young
2024-04-28 21:54:16 +01:00
parent 0363806e7e
commit fa490644dd
2 changed files with 26 additions and 8 deletions
+11
View File
@@ -209,7 +209,18 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
schematic = schItem->Schematic();
if( schItem->IsSelected() )
{
selectedModified = true;
}
else
{
schItem->RunOnChildren(
[&selectedModified]( SCH_ITEM* aChild )
{
if( aChild->IsSelected() )
selectedModified = true;
} );
}
auto updateConnectivityFlag = [&, this]()
{