From 5e394836d299f2a00895b864a1e4fdd27f46cf21 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 15 Dec 2020 12:39:32 +0100 Subject: [PATCH] Fix a wxWidgets alert. Fixes #6743 https://gitlab.com/kicad/code/kicad/issues/6743 --- 3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp b/3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp index 91e6ce0cca..a71538c95f 100644 --- a/3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp +++ b/3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp @@ -114,12 +114,12 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI // Run the viewer control tool, it is supposed to be always active m_toolManager->InvokeTool( "3DViewer.Control" ); - m_SizerPanelView->Add( m_infobar, 0, wxEXPAND, 0 ); - m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 ); - m_infobar = new WX_INFOBAR( this ); m_previewPane->SetInfoBar( m_infobar ); + m_SizerPanelView->Add( m_infobar, 0, wxEXPAND, 0 ); + m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 ); + for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } ) Connect( eventType, wxMenuEventHandler( PANEL_PREV_3D::OnMenuEvent ), NULL, this );