diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 07a7bce9be..08b883b35b 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -69,7 +69,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC : public DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP { public: - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow* aParent ); + DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT_FRAME* aParent ); /** * Initialize controls with \a aComponent. @@ -198,11 +198,9 @@ void SCH_EDIT_FRAME::EditComponent( SCH_COMPONENT* aComponent ) } -DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow* aParent ) : +DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT_FRAME* aParent ) : DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( aParent ) { - wxASSERT( dynamic_cast< SCH_EDIT_FRAME* >( aParent ) ); - #ifndef KICAD_SPICE spiceFieldsButton->Hide(); #endif /* not KICAD_SPICE */ diff --git a/eeschema/dialogs/dialog_edit_components_libid.cpp b/eeschema/dialogs/dialog_edit_components_libid.cpp index 2fe48343d2..71989c40c6 100644 --- a/eeschema/dialogs/dialog_edit_components_libid.cpp +++ b/eeschema/dialogs/dialog_edit_components_libid.cpp @@ -613,8 +613,14 @@ void DIALOG_EDIT_COMPONENTS_LIBID::revertChanges() bool InvokeDialogEditComponentsLibId( SCH_EDIT_FRAME* aCaller ) { + // This dialog itself subsequently can invoke a KIWAY_PLAYER as a quasimodal + // frame. Therefore this dialog as a modal frame parent, MUST be run under + // quasimodal mode for the quasimodal frame support to work. So don't use + // the QUASIMODAL macros here. DIALOG_EDIT_COMPONENTS_LIBID dlg( aCaller ); - dlg.ShowModal(); + // DO NOT use ShowModal() here, otherwise the library browser will not work + // properly. + dlg.ShowQuasiModal(); return dlg.IsSchematicModified(); }