From 6e51905e699960b7bb3820479c5f37480879d2d3 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 13 Dec 2021 18:37:36 -0500 Subject: [PATCH] Kick wxWidgets to set column sizes the first time Fixes https://gitlab.com/kicad/code/kicad/-/issues/6396 --- common/widgets/widget_hotkey_list.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/widgets/widget_hotkey_list.cpp b/common/widgets/widget_hotkey_list.cpp index 28af502702..b8e581d2aa 100644 --- a/common/widgets/widget_hotkey_list.cpp +++ b/common/widgets/widget_hotkey_list.cpp @@ -475,7 +475,12 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey dv->GetColumn( 0 )->SetMinWidth( dv->GetMainWindow()->GetTextExtent( command_header ).x + pad ); dv->GetColumn( 1 )->SetMinWidth( dv->GetMainWindow()->GetTextExtent( longKey ).x + pad ); -#endif + + CallAfter( [&]() + { + GetDataView()->Update(); + } ); + #endif std::vector reserved_keys = {