From 7804c2177cd90f00d7418a82022fda0cedb81c0c Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 23 Jun 2023 08:09:49 -0400 Subject: [PATCH] Do not force focus on dataview in RC dialogs On GTK, this causes the first item to be selected, firing the selection handler and causing unwanted side effects. Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925 --- eeschema/dialogs/dialog_erc.cpp | 2 ++ pcbnew/dialogs/dialog_drc.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 7c3c26cb51..0e9a3e4ee6 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -451,7 +451,9 @@ void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event ) { wxMilliSleep( 500 ); m_runningResultsBook->ChangeSelection( 1 ); +#ifndef __WXGTK__ KIPLATFORM::UI::ForceFocus( m_markerDataView ); +#endif } m_ercRun = true; diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 24c5be1cb3..ceefcc7e81 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -325,7 +325,9 @@ void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent ) { wxMilliSleep( 500 ); m_runningResultsBook->ChangeSelection( 1 ); +#ifndef __WXGTK__ KIPLATFORM::UI::ForceFocus( m_markerDataView ); +#endif } refreshEditor();