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
This commit is contained in:
Ian McInerney 2020-01-03 17:01:46 +00:00
parent be788c6aff
commit 2f75dfb09c
1 changed files with 2 additions and 0 deletions

View File

@ -203,12 +203,14 @@ void LIB_TREE::Regenerate( bool aKeepState )
void LIB_TREE::RefreshLibTree() void LIB_TREE::RefreshLibTree()
{ {
#ifdef __WXOSX__
// Yes, this is an enormous hack. It should be replaced if anyone can figure out a better // 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 // way to get the OSX version to re-fetch the text and attributes from the dataModel for
// each visible item. // each visible item.
int width = m_tree_ctrl->GetColumn( 0 )->GetWidth(); int width = m_tree_ctrl->GetColumn( 0 )->GetWidth();
m_tree_ctrl->GetColumn( 0 )->SetWidth( width + 1 ); m_tree_ctrl->GetColumn( 0 )->SetWidth( width + 1 );
m_tree_ctrl->GetColumn( 0 )->SetWidth( width ); m_tree_ctrl->GetColumn( 0 )->SetWidth( width );
#endif
} }