Fix bug where preview wasn't getting re-added after view cleared.
This commit is contained in:
parent
3cf5db3ce5
commit
9cc6a77cc0
|
@ -104,7 +104,10 @@ void SCH_VIEW::DisplaySheet( SCH_SCREEN *aScreen )
|
|||
|
||||
ResizeSheetWorkingArea( aScreen );
|
||||
|
||||
m_preview.reset( new KIGFX::VIEW_GROUP() );
|
||||
|
||||
Add( m_worksheet.get() );
|
||||
Add( m_preview.get() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -159,6 +162,9 @@ void SCH_VIEW::DisplayComponent( LIB_PART* aPart )
|
|||
|
||||
Add( &item );
|
||||
}
|
||||
|
||||
m_preview.reset( new KIGFX::VIEW_GROUP() );
|
||||
Add( m_preview.get() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ void PCB_VIEW::Add( KIGFX::VIEW_ITEM* aItem, int aDrawPriority )
|
|||
if( item->Type() == PCB_MODULE_T )
|
||||
{
|
||||
auto mod = static_cast<MODULE*>( item );
|
||||
mod->RunOnChildren([this] ( BOARD_ITEM* aModItem ) {
|
||||
mod->RunOnChildren( [this] ( BOARD_ITEM* aModItem )
|
||||
{
|
||||
VIEW::Add( aModItem );
|
||||
} );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue