Fix a focus issue in dialog_edit_module_for_BoardEditor.cpp (Linux only) when creating the dialog.

It prevents ESC or ENTER keys to dismiss the dialog, until the focus is set by clicking on a widgets in the dialog.
This commit is contained in:
jean-pierre charras 2017-04-16 21:48:22 +02:00
parent 4b916b42ed
commit cf87536322
1 changed files with 5 additions and 0 deletions

View File

@ -393,6 +393,11 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties()
// We have modified the UI, so call Fit() for m_Panel3D
// to be sure the m_Panel3D sizers are initiliazed before opening the dialog
m_Panel3D->GetSizer()->Fit( m_Panel3D );
// For some reason, on Linux, after the call to
// m_PreviewPane->SetModelDataIdx( m_LastSelected3DShapeIndex, true )
// the dialog has no longer the focus. Force it:
m_sdbSizerStdButtonsOK->SetFocus();
}