From 8631d670a4e49c2651ba37fffb469ec853de96e4 Mon Sep 17 00:00:00 2001 From: Jeff Young <jeff@rokeby.ie> Date: Sun, 20 Jun 2021 13:36:36 +0100 Subject: [PATCH] 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 --- common/dialog_shim.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index a64ea7f99f..9aca18e13a 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -320,9 +320,11 @@ static void selectAllInTextCtrls( wxWindowList& children ) { if( wxTextCtrl* childTextCtrl = dynamic_cast<wxTextCtrl*>( child ) ) { +#if defined( __WXMAC__ ) || defined( __WXMSW__ ) // Respect an existing selection if( childTextCtrl->GetStringSelection().IsEmpty() ) childTextCtrl->SelectAll(); +#endif } #ifdef __WXMAC__ // Temp hack for square (looking) buttons on OSX. Will likely be made redundant