Make sure Footprint ID gets initialized when calling chooser.
Also make some of the labels in the dialog more explicit.
This commit is contained in:
parent
2401ed587e
commit
79cdd608af
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jul 10 2019)
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -212,7 +212,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE
|
||||||
m_textCtrlTimeStamp->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
|
m_textCtrlTimeStamp->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
|
||||||
m_textCtrlTimeStamp->SetToolTip( _("Unique ID that identifies the symbol") );
|
m_textCtrlTimeStamp->SetToolTip( _("Unique ID that identifies the symbol") );
|
||||||
|
|
||||||
bSizerUUID->Add( m_textCtrlTimeStamp, 1, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
|
bSizerUUID->Add( m_textCtrlTimeStamp, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerBottom->Add( bSizerUUID, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
bSizerBottom->Add( bSizerUUID, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<property name="file">dialog_edit_component_in_schematic_base</property>
|
<property name="file">dialog_edit_component_in_schematic_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
<property name="help_provider">none</property>
|
||||||
<property name="image_path_wrapper_function_name"></property>
|
|
||||||
<property name="indent_with_spaces"></property>
|
<property name="indent_with_spaces"></property>
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
<property name="name">dialog_edit_component_in_schematic_base</property>
|
<property name="name">dialog_edit_component_in_schematic_base</property>
|
||||||
|
@ -26,7 +25,6 @@
|
||||||
<property name="skip_php_events">1</property>
|
<property name="skip_php_events">1</property>
|
||||||
<property name="skip_python_events">1</property>
|
<property name="skip_python_events">1</property>
|
||||||
<property name="ui_table">UI</property>
|
<property name="ui_table">UI</property>
|
||||||
<property name="use_array_enum">0</property>
|
|
||||||
<property name="use_enum">0</property>
|
<property name="use_enum">0</property>
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Dialog" expanded="1">
|
<object class="Dialog" expanded="1">
|
||||||
|
@ -1357,7 +1355,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxTextCtrl" expanded="0">
|
<object class="wxTextCtrl" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jul 10 2019)
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
|
|
@ -82,6 +82,16 @@ void DIALOG_EDIT_ONE_FIELD::init()
|
||||||
{
|
{
|
||||||
SCH_BASE_FRAME* parent = GetParent();
|
SCH_BASE_FRAME* parent = GetParent();
|
||||||
bool libedit = parent->IsType( FRAME_SCH_LIB_EDITOR );
|
bool libedit = parent->IsType( FRAME_SCH_LIB_EDITOR );
|
||||||
|
|
||||||
|
switch( m_fieldId )
|
||||||
|
{
|
||||||
|
case REFERENCE: m_textLabel->SetLabel( _( "Reference designator:" ) ); break;
|
||||||
|
case VALUE: m_textLabel->SetLabel( _( "Value:" ) ); break;
|
||||||
|
case FOOTPRINT: m_textLabel->SetLabel( _( "Footprint ID:" ) ); break;
|
||||||
|
case DATASHEET: m_textLabel->SetLabel( _( "Datasheet URL:" ) ); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
m_TextCtrl->SetValidator( SCH_FIELD_VALIDATOR( libedit, m_fieldId, &m_text ) );
|
m_TextCtrl->SetValidator( SCH_FIELD_VALIDATOR( libedit, m_fieldId, &m_text ) );
|
||||||
|
|
||||||
// Disable options for graphic text editing which are not needed for fields.
|
// Disable options for graphic text editing which are not needed for fields.
|
||||||
|
@ -100,6 +110,7 @@ void DIALOG_EDIT_ONE_FIELD::init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the footprint selection dialog if this is the footprint field.
|
// Show the footprint selection dialog if this is the footprint field.
|
||||||
|
m_TextValueSelectButton->SetBitmap( KiBitmap( small_library_xpm ) );
|
||||||
m_TextValueSelectButton->Show( m_fieldId == FOOTPRINT );
|
m_TextValueSelectButton->Show( m_fieldId == FOOTPRINT );
|
||||||
|
|
||||||
// Value fields of power components cannot be modified. This will grey out
|
// Value fields of power components cannot be modified. This will grey out
|
||||||
|
@ -137,7 +148,12 @@ void DIALOG_EDIT_ONE_FIELD::init()
|
||||||
void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent )
|
void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
// pick a footprint using the footprint picker.
|
// pick a footprint using the footprint picker.
|
||||||
wxString fpid = m_TextCtrl->GetValue();
|
wxString fpid;
|
||||||
|
|
||||||
|
if( m_StyledTextCtrl->IsShown() )
|
||||||
|
fpid = m_StyledTextCtrl->GetValue();
|
||||||
|
else
|
||||||
|
fpid = m_TextCtrl->GetValue();
|
||||||
|
|
||||||
KIWAY_PLAYER* frame = Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true );
|
KIWAY_PLAYER* frame = Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true );
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,12 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
|
||||||
wxBoxSizer* bTextValueBoxSizer;
|
wxBoxSizer* bTextValueBoxSizer;
|
||||||
bTextValueBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
bTextValueBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_textLabel = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText1->Wrap( -1 );
|
m_textLabel->Wrap( -1 );
|
||||||
bTextValueBoxSizer->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
bTextValueBoxSizer->Add( m_textLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_TextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_TextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bTextValueBoxSizer->Add( m_TextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
bTextValueBoxSizer->Add( m_TextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
m_StyledTextCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString );
|
m_StyledTextCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString );
|
||||||
m_StyledTextCtrl->SetUseTabs( true );
|
m_StyledTextCtrl->SetUseTabs( true );
|
||||||
|
@ -67,13 +67,13 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
|
||||||
m_PowerComponentValues->Wrap( -1 );
|
m_PowerComponentValues->Wrap( -1 );
|
||||||
m_PowerComponentValues->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
m_PowerComponentValues->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||||
|
|
||||||
bTextValueBoxSizer->Add( m_PowerComponentValues, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
bTextValueBoxSizer->Add( m_PowerComponentValues, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
m_TextValueSelectButton = new wxButton( this, wxID_ANY, _("Select"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_TextValueSelectButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
bTextValueBoxSizer->Add( m_TextValueSelectButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
bTextValueBoxSizer->Add( m_TextValueSelectButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="1">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticText1</property>
|
<property name="name">m_textLabel</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxTextCtrl" expanded="1">
|
<object class="wxTextCtrl" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -281,7 +281,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="1">
|
<object class="wxStaticText" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -340,11 +340,11 @@
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="0">
|
<object class="wxBitmapButton" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
|
@ -377,7 +377,7 @@
|
||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Select</property>
|
<property name="label">Select...</property>
|
||||||
<property name="margins"></property>
|
<property name="margins"></property>
|
||||||
<property name="markup">0</property>
|
<property name="markup">0</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
|
@ -400,7 +400,7 @@
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style"></property>
|
<property name="style"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type"></property>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/stc/stc.h>
|
#include <wx/stc/stc.h>
|
||||||
|
#include <wx/bmpbuttn.h>
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
#include <wx/icon.h>
|
#include <wx/icon.h>
|
||||||
|
@ -39,11 +40,11 @@ class DIALOG_LIB_EDIT_TEXT_BASE : public DIALOG_SHIM
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxStaticText* m_staticText1;
|
wxStaticText* m_textLabel;
|
||||||
wxTextCtrl* m_TextCtrl;
|
wxTextCtrl* m_TextCtrl;
|
||||||
wxStyledTextCtrl* m_StyledTextCtrl;
|
wxStyledTextCtrl* m_StyledTextCtrl;
|
||||||
wxStaticText* m_PowerComponentValues;
|
wxStaticText* m_PowerComponentValues;
|
||||||
wxButton* m_TextValueSelectButton;
|
wxBitmapButton* m_TextValueSelectButton;
|
||||||
wxCheckBox* m_visible;
|
wxCheckBox* m_visible;
|
||||||
wxStaticText* m_xPosLabel;
|
wxStaticText* m_xPosLabel;
|
||||||
wxTextCtrl* m_xPosCtrl;
|
wxTextCtrl* m_xPosCtrl;
|
||||||
|
|
Loading…
Reference in New Issue