Jeff Young 2019-09-04 20:07:19 +01:00
parent 0e90c719b0
commit 8d04d39036
1 changed files with 6 additions and 1 deletions

View File

@ -151,10 +151,15 @@ void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent
void DIALOG_EDIT_ONE_FIELD::OnSetFocusText( wxFocusEvent& event )
{
#ifdef __WXGTK__
// Force an update of the text control before setting the text selection
// This is needed because GTK seems to ignore the selection on first update
//
// Note that we can't do this on OSX as it tends to provoke Apple's
// "[NSAlert runModal] may not be invoked inside of transaction begin/commit pair"
// bug. See: https://bugs.launchpad.net/kicad/+bug/1837225
m_TextValue->Update();
#endif
if( m_fieldId == REFERENCE )
SelectReferenceNumber( static_cast<wxTextEntry*>( m_TextValue ) );