From 2f75dfb09c0a9ab28c6b25a0f86048a0a8255c6f Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 3 Jan 2020 17:01:46 +0000 Subject: [PATCH] Fix symbol editor column widths 102b5301 introduced an issue on GTK where the column width was incorrect when read, then was set incorrectly (a known problem on GTK tree views). We should only apply that fix on OSX. Fixes https://gitlab.com/kicad/code/kicad/issues/3720 --- common/widgets/lib_tree.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index 38cb1fcf3c..20d74c8994 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -203,12 +203,14 @@ void LIB_TREE::Regenerate( bool aKeepState ) void LIB_TREE::RefreshLibTree() { +#ifdef __WXOSX__ // Yes, this is an enormous hack. It should be replaced if anyone can figure out a better // way to get the OSX version to re-fetch the text and attributes from the dataModel for // each visible item. int width = m_tree_ctrl->GetColumn( 0 )->GetWidth(); m_tree_ctrl->GetColumn( 0 )->SetWidth( width + 1 ); m_tree_ctrl->GetColumn( 0 )->SetWidth( width ); +#endif }