← Back to team overview

kicad-developers team mailing list archive

[PATCH] - Symbol Table Reference column fix

 

https://bugs.launchpad.net/kicad/+bug/1753330
From 5094bf1e3f38ea7f67e7adf79c7bf7c4ab3b2114 Mon Sep 17 00:00:00 2001
From: hauptmech <hauptmech@xxxxxxxxx>
Date: Fri, 9 Mar 2018 14:44:20 +1300
Subject: [PATCH] Use fixed width on first Symbol Table column
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.16.2"

This is a multi-part message in MIME format.
--------------2.16.2
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


Autosize when the reference field is a list of all components was too long.

Fixes: lp:1753330
https://bugs.launchpad.net/kicad/+bug/1753330
---
 eeschema/dialogs/dialog_fields_editor_global.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)


--------------2.16.2
Content-Type: text/x-patch; name="0001-Use-fixed-width-on-first-Symbol-Table-column.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Use-fixed-width-on-first-Symbol-Table-column.patch"

diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_fields_editor_global.cpp
index a5b679eae..2d630bb78 100644
--- a/eeschema/dialogs/dialog_fields_editor_global.cpp
+++ b/eeschema/dialogs/dialog_fields_editor_global.cpp
@@ -84,8 +84,16 @@ DIALOG_FIELDS_EDITOR_GLOBAL::DIALOG_FIELDS_EDITOR_GLOBAL( SCH_EDIT_FRAME* parent
     sortColumn->SetWidth( wxCOL_WIDTH_AUTOSIZE );
     sortColumn->SetResizeable( false );
 
+
+	// Reference column is either single reference or a list of references.
+	// Autosize can fill the window in the case of a list so use a fixed width.
+	// wxCOL_WIDTH_DEFAULT is wxDVC_DEFAULT_WIDTH on all platforms and too small.
+    auto refcol = m_bomView->GetColumn( 0 );
+    refcol->SetWidth( wxDVC_DEFAULT_WIDTH * 2 );
+    refcol->SetResizeable( true );
+
     // Set default column widths for BOM table
-    for( unsigned int ii = 0; ii < m_bomView->GetColumnCount(); ii++ )
+    for( unsigned int ii = 1; ii < m_bomView->GetColumnCount(); ii++ )
     {
         auto col = m_bomView->GetColumn( ii );
 

--------------2.16.2--



Follow ups