From dce351791ca2189e796a12e4faabc7dc8073f4fd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 1 Apr 2021 13:54:32 +0200 Subject: [PATCH] Eeschema, DIALOG_SYMBOL_PROPERTIES_BASE: very minor fix: make lib link copiable. Fixes #8080 https://gitlab.com/kicad/code/kicad/issues/8080 --- .../dialogs/dialog_symbol_properties_base.cpp | 17 +++++----- .../dialogs/dialog_symbol_properties_base.fbp | 34 +++++++------------ .../dialogs/dialog_symbol_properties_base.h | 7 ++-- 3 files changed, 25 insertions(+), 33 deletions(-) diff --git a/eeschema/dialogs/dialog_symbol_properties_base.cpp b/eeschema/dialogs/dialog_symbol_properties_base.cpp index 5b6f26b949..43457899c6 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_symbol_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -49,6 +49,7 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, m_fieldsGrid->SetColSize( 10, 84 ); m_fieldsGrid->EnableDragColMove( false ); m_fieldsGrid->EnableDragColSize( true ); + m_fieldsGrid->SetColLabelSize( 22 ); m_fieldsGrid->SetColLabelValue( 0, _("Name") ); m_fieldsGrid->SetColLabelValue( 1, _("Value") ); m_fieldsGrid->SetColLabelValue( 2, _("Show") ); @@ -60,7 +61,6 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, m_fieldsGrid->SetColLabelValue( 8, _("Orientation") ); m_fieldsGrid->SetColLabelValue( 9, _("X Position") ); m_fieldsGrid->SetColLabelValue( 10, _("Y Position") ); - m_fieldsGrid->SetColLabelSize( 22 ); m_fieldsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -260,12 +260,12 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, m_pinGrid->SetColSize( 4, 140 ); m_pinGrid->EnableDragColMove( false ); m_pinGrid->EnableDragColSize( true ); + m_pinGrid->SetColLabelSize( 24 ); m_pinGrid->SetColLabelValue( 0, _("Pin Number") ); m_pinGrid->SetColLabelValue( 1, _("Base Pin Name") ); m_pinGrid->SetColLabelValue( 2, _("Alternate Assignment") ); m_pinGrid->SetColLabelValue( 3, _("Electrical Type") ); m_pinGrid->SetColLabelValue( 4, _("Graphic Style") ); - m_pinGrid->SetColLabelSize( 24 ); m_pinGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -300,17 +300,16 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, m_libraryIDLabel = new wxStaticText( this, wxID_ANY, _("Library link:"), wxDefaultPosition, wxDefaultSize, 0 ); m_libraryIDLabel->Wrap( -1 ); - bLibLink->Add( m_libraryIDLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + bLibLink->Add( m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_tcLibraryID = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END ); - m_tcLibraryID->Wrap( -1 ); - bLibLink->Add( m_tcLibraryID, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + m_tcLibraryID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE ); + bLibLink->Add( m_tcLibraryID, 1, wxALIGN_CENTER_VERTICAL, 5 ); - bSizerBottom->Add( bLibLink, 1, wxEXPAND|wxLEFT, 10 ); + bSizerBottom->Add( bLibLink, 1, wxLEFT|wxEXPAND, 10 ); - bSizerBottom->Add( 20, 0, 0, wxEXPAND, 5 ); + bSizerBottom->Add( 20, 0, 0, 0, 5 ); m_spiceFieldsButton = new wxButton( this, wxID_ANY, _("Spice Model..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizerBottom->Add( m_spiceFieldsButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); diff --git a/eeschema/dialogs/dialog_symbol_properties_base.fbp b/eeschema/dialogs/dialog_symbol_properties_base.fbp index 9fd0e97bb3..5ba0148815 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_symbol_properties_base.fbp @@ -14,7 +14,6 @@ dialog_symbol_properties_base 1000 none - 1 dialog_edit_component_in_schematic_base @@ -26,7 +25,6 @@ 1 1 UI - 0 0 0 @@ -303,7 +301,6 @@ - 0 @@ -377,7 +374,6 @@ - 0 @@ -451,7 +447,6 @@ - 0 @@ -535,7 +530,6 @@ - 0 @@ -1427,7 +1421,6 @@ - 0 @@ -1501,7 +1494,6 @@ - 0 @@ -1575,7 +1567,6 @@ - 0 @@ -1659,7 +1650,6 @@ - 0 @@ -1903,7 +1893,7 @@ none 10 - wxEXPAND|wxLEFT + wxLEFT|wxEXPAND 1 @@ -1912,7 +1902,7 @@ none 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxLEFT 0 1 @@ -1973,9 +1963,9 @@ 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + wxALIGN_CENTER_VERTICAL 1 - + 1 1 1 @@ -2003,11 +1993,10 @@ 0 0 wxID_ANY - MyLabel - 0 0 + 0 @@ -2022,21 +2011,25 @@ Resizable 1 - wxST_ELLIPSIZE_END + wxTE_READONLY ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + + - - -1 + wxBORDER_NONE 5 - wxEXPAND + 0 0 @@ -2057,7 +2050,6 @@ - 0 diff --git a/eeschema/dialogs/dialog_symbol_properties_base.h b/eeschema/dialogs/dialog_symbol_properties_base.h index 404cee786e..3cfa2fd6cd 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.h +++ b/eeschema/dialogs/dialog_symbol_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -32,6 +32,7 @@ class WX_GRID; #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////// @@ -70,13 +71,13 @@ class DIALOG_SYMBOL_PROPERTIES_BASE : public DIALOG_SHIM wxPanel* m_pinTablePage; WX_GRID* m_pinGrid; wxStaticText* m_libraryIDLabel; - wxStaticText* m_tcLibraryID; + wxTextCtrl* m_tcLibraryID; wxButton* m_spiceFieldsButton; wxStdDialogButtonSizer* m_stdDialogButtonSizer; wxButton* m_stdDialogButtonSizerOK; wxButton* m_stdDialogButtonSizerCancel; - // Virtual event handlers, override them in your derived class + // Virtual event handlers, overide them in your derived class virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnGridEditorShown( wxGridEvent& event ) { event.Skip(); }