mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Don't assume an EDA_ITEM is a SCH_ITEM.
(It might in fact be a LIB_ITEM, which we don't put in the RTree anyway.) Fixes https://gitlab.com/kicad/code/kicad/issues/14516
This commit is contained in:
parent
11995c1350
commit
cec4109176
@ -384,7 +384,7 @@ void SCH_BASE_FRAME::UpdateItem( EDA_ITEM* aItem, bool isAddOrDelete, bool aUpda
|
||||
* Be careful when calling this. Update will invalidate RTree iterators, so you cannot call this
|
||||
* while doing things like `for( SCH_ITEM* item : screen->Items() )`
|
||||
*/
|
||||
if( aUpdateRtree)
|
||||
if( aUpdateRtree && dynamic_cast<SCH_ITEM*>( aItem ) )
|
||||
GetScreen()->Update( static_cast<SCH_ITEM*>( aItem ) );
|
||||
|
||||
// Calling Refresh() here introduces a bi-stable state: when doing operations on a
|
||||
|
Loading…
Reference in New Issue
Block a user