Eeschema: Cannot close opening Library Browser frame when reassigning symbols from the Library Browser (wxGTK specific)

Fixes: lp:1740607
https://bugs.launchpad.net/kicad/+bug/1740607
This commit is contained in:
jean-pierre charras 2018-01-01 13:17:06 +01:00
parent 6bb349e933
commit 7d6230ab38
2 changed files with 9 additions and 5 deletions

View File

@ -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 */

View File

@ -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();
}