From e4b7bc82be76b074987a76da034e5a28a7506dc5 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 29 Nov 2022 19:35:59 -0800 Subject: [PATCH] Prevent UI events during footprint dialog ctor Errors may get thrown when the 3d models are loaded for missing search paths. This triggers the idle event that makes assumptions about the state of the dialog. We halt event handling until the ctor finishes. Fixes https://gitlab.com/kicad/code/kicad/issues/12944 (cherry picked from commit be86e9f57fbe5ae76d23e28c6d6e2e1ceffec08d) --- pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index 7ca0fe9c34..5730162885 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -137,6 +137,7 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( m_gridSize( 0, 0 ), m_lastRequestedSize( 0, 0 ) { + SetEvtHandlerEnabled( false ); // Create the 3D models page m_3dPanel = new PANEL_FP_PROPERTIES_3D_MODEL( m_frame, m_footprint, this, m_NoteBook ); m_NoteBook->AddPage( m_3dPanel, _("3D Models"), false ); @@ -221,6 +222,7 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( SetupStandardButtons(); finishDialogSettings(); + SetEvtHandlerEnabled( true ); }