From 2da470e1f9eb6c876cf7388778b78bbd815621d6 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 19 May 2022 09:09:45 -0700 Subject: [PATCH] Prevent programatic changes from sending events When setting search history using the CTOR, we need to avoid triggering an event that will run independent of the user interaction. Our LIB_TREE interface is fragile on GTK and needs explicit conditions to avoid segfaults Fixes https://gitlab.com/kicad/code/kicad/issues/11633 --- common/widgets/lib_tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index f8654cfdb4..5306a0774d 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -209,7 +209,7 @@ void LIB_TREE::ExpandLibId( const LIB_ID& aLibId ) void LIB_TREE::SetSearchString( const wxString& aSearchString ) { - m_query_ctrl->SetValue( aSearchString ); + m_query_ctrl->ChangeValue( aSearchString ); }