Browse Source

PANEL_DESIGN_BLOCK_CHOOSER: use the same draw engine type as in main frame.

This is not always the Opengl GAL_TYPE

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20386
revert-0c36e162
jean-pierre charras 8 months ago
parent
commit
b7fd26e026
  1. 6
      eeschema/widgets/panel_design_block_chooser.cpp

6
eeschema/widgets/panel_design_block_chooser.cpp

@ -103,8 +103,10 @@ PANEL_DESIGN_BLOCK_CHOOSER::PANEL_DESIGN_BLOCK_CHOOSER( SCH_EDIT_FRAME* aFrame,
wxBoxSizer* detailsSizer = new wxBoxSizer( wxVERTICAL );
detailsPanel->SetSizer( detailsSizer );
m_preview = new DESIGN_BLOCK_PREVIEW_WIDGET( detailsPanel, false,
EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL );
// Use the same draw engine type as the one used in parent frame m_frame
EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = m_frame->GetCanvas()->GetBackend();
m_preview = new DESIGN_BLOCK_PREVIEW_WIDGET( detailsPanel, false, canvasType );
detailsSizer->Add( m_preview, 1, wxEXPAND, 5 );
detailsPanel->Layout();
detailsSizer->Fit( detailsPanel );

Loading…
Cancel
Save