From d6b8e9e0371a4155cbb4065888d88aaf88345052 Mon Sep 17 00:00:00 2001 From: John Beard Date: Wed, 27 Mar 2019 12:36:28 +0000 Subject: [PATCH] Pcbnew: Improve tab traversal in text properties dialog Tab through the grid vertically, then horizontally, as the fields are laid out with "related" fields (like the co-ords) vertically. Also neaten headers. Fixes: lp:1821887 * https://bugs.launchpad.net/kicad/+bug/1821887 --- pcbnew/dialogs/dialog_text_properties.cpp | 43 +++++++++++++++++------ 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 3f10335d10..de97648668 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -22,24 +22,28 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include #include + +#include #include +#include +#include #include #include -#include -#include +#include +#include +#include -#include +#include /** @@ -149,6 +153,23 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO m_sdbSizerOK->SetDefault(); + // Tab down the left side first + KIUI::SetControlsTabOrder( { + m_LayerLabel, + m_LayerSelectionCtrl, + m_SizeXCtrl, + m_SizeYCtrl, + m_ThicknessCtrl, + m_PositionXCtrl, + m_PositionYCtrl, + m_Visible, + m_Italic, + m_JustifyChoice, + m_OrientCtrl, + m_Mirrored, + m_KeepUpright, + } ); + // wxTextCtrls fail to generate wxEVT_CHAR events when the wxTE_MULTILINE flag is set, // so we have to listen to wxEVT_CHAR_HOOK events instead. Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ), NULL, this );