diff --git a/eeschema/sch_view.cpp b/eeschema/sch_view.cpp index 965e87c841..4ee37a419f 100644 --- a/eeschema/sch_view.cpp +++ b/eeschema/sch_view.cpp @@ -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() ); } diff --git a/pcbnew/pcb_view.cpp b/pcbnew/pcb_view.cpp index 0bbad1aa41..1b05c06656 100644 --- a/pcbnew/pcb_view.cpp +++ b/pcbnew/pcb_view.cpp @@ -62,9 +62,10 @@ void PCB_VIEW::Add( KIGFX::VIEW_ITEM* aItem, int aDrawPriority ) if( item->Type() == PCB_MODULE_T ) { auto mod = static_cast( item ); - mod->RunOnChildren([this] ( BOARD_ITEM* aModItem ) { - VIEW::Add( aModItem ); - } ); + mod->RunOnChildren( [this] ( BOARD_ITEM* aModItem ) + { + VIEW::Add( aModItem ); + } ); } VIEW::Add( item, aDrawPriority );