The logical flow of the Text Properties dialog in pcbnew is vertical, not horizontal, but the wx 
grid control naturally arranges the widgets horizontally and the tab order follows that. This means 
that after "Size X", [tab] moves to "Position X", which is unlikely to be the 
next desired control. It's really annoying when editing a bunch of texts.

Here's a patch that manually assigns the tab order in that dialog according to 
the natural flow of the controls.

--
Chris

diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp
index eca91a1..13b52f5 100644
--- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp
+++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp
@@ -153,6 +153,18 @@ void DIALOG_PCB_TEXT_PROPERTIES::MyInit()
     EDA_TEXT_HJUSTIFY_T hJustify = m_SelectedPCBText->GetHorizJustify();
     m_justifyChoice->SetSelection( (int) hJustify + 1 );
 
+    // Manually set tab order
+    m_SizeXCtrl->MoveAfterInTabOrder( m_TextContentCtrl );
+    m_SizeYCtrl->MoveAfterInTabOrder( m_SizeXCtrl );
+    m_ThicknessCtrl->MoveAfterInTabOrder( m_SizeYCtrl );
+    m_PositionXCtrl->MoveAfterInTabOrder( m_ThicknessCtrl );
+    m_PositionYCtrl->MoveAfterInTabOrder( m_PositionXCtrl );
+    m_OrientationCtrl->MoveAfterInTabOrder( m_PositionYCtrl );
+    m_LayerSelectionCtrl->MoveAfterInTabOrder( m_OrientationCtrl );
+    m_StyleCtrl->MoveAfterInTabOrder( m_LayerSelectionCtrl );
+    m_DisplayCtrl->MoveAfterInTabOrder( m_StyleCtrl );
+    m_justifyChoice->MoveAfterInTabOrder( m_DisplayCtrl );
+
     // Set focus on most important control
     m_TextContentCtrl->SetFocus();
     m_TextContentCtrl->SetSelection( -1, -1 );
diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp b/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp
index 7473eb8..8a3f0eb 100644
--- a/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp
+++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.cpp
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Oct  8 2012)
+// C++ code generated with wxFormBuilder (version Mar 13 2015)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp b/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp
index 22b5ab4..547aa6b 100644
--- a/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp
+++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.fbp
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <wxFormBuilder_Project>
-    <FileVersion major="1" minor="11" />
+    <FileVersion major="1" minor="13" />
     <object class="Project" expanded="1">
         <property name="class_decoration"></property>
         <property name="code_generation">C++</property>
@@ -20,8 +20,10 @@
         <property name="path">.</property>
         <property name="precompiled_header"></property>
         <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
         <property name="skip_php_events">1</property>
         <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
         <property name="use_enum">0</property>
         <property name="use_microsoft_bom">0</property>
         <object class="Dialog" expanded="1">
diff --git a/pcbnew/dialogs/dialog_pcb_text_properties_base.h b/pcbnew/dialogs/dialog_pcb_text_properties_base.h
index c049515..d134b4c 100644
--- a/pcbnew/dialogs/dialog_pcb_text_properties_base.h
+++ b/pcbnew/dialogs/dialog_pcb_text_properties_base.h
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Oct  8 2012)
+// C++ code generated with wxFormBuilder (version Mar 13 2015)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to