Unselected tree before syncing
On GTK, the selected item is checked for its parent when being unselected. This breaks if the parent has been removed by the Sync() call, so we need to ensure that the unselect all call happens prior
This commit is contained in:
parent
9f4dfe77cb
commit
d21eba4021
|
@ -1040,10 +1040,13 @@ void FOOTPRINT_EDIT_FRAME::SyncLibraryTree( bool aProgress )
|
||||||
GFootprintList.ReadFootprintFiles( fpTable, nullptr, nullptr );
|
GFootprintList.ReadFootprintFiles( fpTable, nullptr, nullptr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unselect before syncing to avoid null reference in the adapter
|
||||||
|
// if a selected item is removed during the sync
|
||||||
|
GetLibTree()->Unselect();
|
||||||
|
|
||||||
// Sync the LIB_TREE to the FOOTPRINT_INFO list
|
// Sync the LIB_TREE to the FOOTPRINT_INFO list
|
||||||
adapter->Sync( fpTable );
|
adapter->Sync( fpTable );
|
||||||
|
|
||||||
GetLibTree()->Unselect();
|
|
||||||
GetLibTree()->Regenerate( true );
|
GetLibTree()->Regenerate( true );
|
||||||
|
|
||||||
if( target.IsValid() )
|
if( target.IsValid() )
|
||||||
|
|
Loading…
Reference in New Issue