Don't selectall in GTK text boxes.

It's not clear that it's normal platform behaviour, and some GTK
window managers fail to non draw the selection in inactive text
boxes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8197
This commit is contained in:
Jeff Young 2021-06-20 13:36:36 +01:00
parent de4eb1fcef
commit 8631d670a4
1 changed files with 2 additions and 0 deletions

View File

@ -320,9 +320,11 @@ static void selectAllInTextCtrls( wxWindowList& children )
{ {
if( wxTextCtrl* childTextCtrl = dynamic_cast<wxTextCtrl*>( child ) ) if( wxTextCtrl* childTextCtrl = dynamic_cast<wxTextCtrl*>( child ) )
{ {
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
// Respect an existing selection // Respect an existing selection
if( childTextCtrl->GetStringSelection().IsEmpty() ) if( childTextCtrl->GetStringSelection().IsEmpty() )
childTextCtrl->SelectAll(); childTextCtrl->SelectAll();
#endif
} }
#ifdef __WXMAC__ #ifdef __WXMAC__
// Temp hack for square (looking) buttons on OSX. Will likely be made redundant // Temp hack for square (looking) buttons on OSX. Will likely be made redundant