Commit efe5658a authored by jean-pierre charras's avatar jean-pierre charras

Fix bug Bug #1432165 (fp lib table dialog editor not shown on XFCE and Unity)

Cvpcb: Shows a better message when a netlist is not found.
parent f743b988
...@@ -799,6 +799,15 @@ int CVPCB_MAINFRAME::ReadSchematicNetlist() ...@@ -799,6 +799,15 @@ int CVPCB_MAINFRAME::ReadSchematicNetlist()
wxString compFootprintLinkFileName; wxString compFootprintLinkFileName;
wxFileName fn = m_NetlistFileName; wxFileName fn = m_NetlistFileName;
// Ensure the netlist file exists, and wran the user if not:
if( ! wxFileExists( m_NetlistFileName.GetFullPath() ) )
{
msg.Printf( _( "Unable to find netlist file:\n'%s'\n\nPlease, create it" ),
GetChars( m_NetlistFileName.GetFullPath() ) );
wxMessageBox( msg, _( "Netlist Load Error" ), wxOK | wxICON_ERROR );
return 1;
}
// Load the footprint association file if it has already been created. // Load the footprint association file if it has already been created.
fn.SetExt( ComponentFileExtension ); fn.SetExt( ComponentFileExtension );
......
...@@ -51,9 +51,11 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin ...@@ -51,9 +51,11 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin
m_sdbSizerButtonsOK->SetDefault(); m_sdbSizerButtonsOK->SetDefault();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
Raise(); // On Unity, ans some other windows manager,
// this dialog is not always shown, // On some windows manager (Unity, XFCE), this dialog is
// depending on this dialog is run. Force it to be shown // not always raised, depending on this dialog is run.
// Force it to be raised
Raise();
} }
......
...@@ -369,6 +369,11 @@ public: ...@@ -369,6 +369,11 @@ public:
// for ALT+A handling, we want the initial focus to be on the first selected grid. // for ALT+A handling, we want the initial focus to be on the first selected grid.
m_cur_grid->SetFocus(); m_cur_grid->SetFocus();
// On some windows manager (Unity, XFCE), this dialog is
// not always raised, depending on this dialog is run.
// Force it to be raised
Raise();
} }
~DIALOG_FP_LIB_TABLE() ~DIALOG_FP_LIB_TABLE()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment