Rework Symbol Props to Footprint Props design.

Fixes https://gitlab.com/kicad/code/kicad/issues/2286

Fixes https://gitlab.com/kicad/code/kicad/issues/5414
This commit is contained in:
Jeff Young 2020-09-02 01:37:28 +01:00
parent eb16fec7ec
commit fa8138ee5a
6 changed files with 1253 additions and 860 deletions

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <dialogs/dialog_edit_component_in_schematic.h>
#include "dialog_edit_component_in_schematic.h"
#include <wx/tooltip.h>
@ -33,7 +33,6 @@
#include <ee_collectors.h>
#include <class_library.h>
#include <fields_grid_table.h>
#include <invoke_sch_dialog.h>
#include <sch_edit_frame.h>
#include <sch_reference_list.h>
#include <schematic.h>
@ -65,9 +64,10 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT
// disable some options inside the edit dialog which can cause problems while dragging
if( m_cmp->IsDragging() )
{
m_rbOrientation->Disable();
m_rbMirror->Disable();
m_libraryNameTextCtrl->Disable();
m_orientationLabel->Disable();
m_orientationCtrl->Disable();
m_mirrorLabel->Disable();
m_mirrorCtrl->Disable();
}
// Give a bit more room for combobox editors
@ -85,11 +85,17 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT
m_grid->ShowHideColumns( m_shownColumns );
}
// Set font size for items showing long strings:
wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
m_libraryIDLabel->SetFont( infoFont );
m_tcLibraryID->SetFont( infoFont );
wxToolTip::Enable( true );
m_stdDialogButtonSizerOK->SetDefault();
// Configure button logos
m_buttonBrowseLibrary->SetBitmap( KiBitmap( small_library_xpm ) );
m_bpAdd->SetBitmap( KiBitmap( small_plus_xpm ) );
m_bpDelete->SetBitmap( KiBitmap( trash_xpm ) );
m_bpMoveUp->SetBitmap( KiBitmap( small_up_xpm ) );
@ -191,90 +197,39 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataToWindow()
// Set the symbol orientation and mirroring.
int orientation = m_cmp->GetOrientation() & ~( CMP_MIRROR_X | CMP_MIRROR_Y );
if( orientation == CMP_ORIENT_90 )
m_rbOrientation->SetSelection( 1 );
else if( orientation == CMP_ORIENT_180 )
m_rbOrientation->SetSelection( 2 );
else if( orientation == CMP_ORIENT_270 )
m_rbOrientation->SetSelection( 3 );
else
m_rbOrientation->SetSelection( 0 );
switch( orientation )
{
default:
case CMP_ORIENT_0: m_orientationCtrl->SetSelection( 0 ); break;
case CMP_ORIENT_90: m_orientationCtrl->SetSelection( 1 ); break;
case CMP_ORIENT_270: m_orientationCtrl->SetSelection( 2 ); break;
case CMP_ORIENT_180: m_orientationCtrl->SetSelection( 3 ); break;
}
int mirror = m_cmp->GetOrientation() & ( CMP_MIRROR_X | CMP_MIRROR_Y );
if( mirror == CMP_MIRROR_X )
m_rbMirror->SetSelection( 1 );
else if( mirror == CMP_MIRROR_Y )
m_rbMirror->SetSelection( 2 );
else
m_rbMirror->SetSelection( 0 );
// Set the component's library name.
m_libraryNameTextCtrl->SetValue( m_cmp->GetLibId().Format() );
switch( mirror )
{
default: m_mirrorCtrl->SetSelection( 0 ) ; break;
case CMP_MIRROR_X: m_mirrorCtrl->SetSelection( 1 ); break;
case CMP_MIRROR_Y: m_mirrorCtrl->SetSelection( 2 ); break;
}
m_cbExcludeFromBom->SetValue( !m_cmp->GetIncludeInBom() );
m_cbExcludeFromBoard->SetValue( !m_cmp->GetIncludeOnBoard() );
m_ShowPinNumButt->SetValue( m_part->ShowPinNumbers() );
m_ShowPinNameButt->SetValue( m_part->ShowPinNames() );
// Set the component's library name.
m_tcLibraryID->SetValue( m_cmp->GetLibId().Format() );
Layout();
return true;
}
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnBrowseLibrary( wxCommandEvent& event )
{
std::vector<COMPONENT_SELECTION> dummy;
LIB_ID id;
id.Parse( m_libraryNameTextCtrl->GetValue(), LIB_ID::ID_SCH );
auto sel = GetParent()->SelectCompFromLibTree( nullptr, dummy, true, 0, 0, false, &id );
if( !sel.LibId.IsValid() )
return;
m_libraryNameTextCtrl->SetValue( sel.LibId.Format() );
LIB_PART* entry = GetParent()->GetLibPart( sel.LibId );
if( entry )
{
// Update the value field for Power symbols
if( entry->IsPower() )
m_grid->SetCellValue( VALUE, FDC_VALUE, sel.LibId.GetLibItemName() );
// Update the units control
int unit = m_unitChoice->GetSelection();
m_unitChoice->Clear();
if( entry->GetUnitCount() > 1 )
{
for( int ii = 1; ii <= entry->GetUnitCount(); ii++ )
m_unitChoice->Append( LIB_PART::SubReference( ii, false ) );
if( unit < 0 || static_cast<unsigned>( unit ) >= m_unitChoice->GetCount() )
unit = 0;
m_unitChoice->SetSelection( unit );
m_unitLabel->Enable( true );
m_unitChoice->Enable( true );
}
else
{
m_unitChoice->SetSelection( -1 );
m_unitLabel->Enable( false );
m_unitChoice->Enable( false );
}
// Update the deMorgan conversion controls
bool conversion = m_cbAlternateSymbol->GetValue();
m_cbAlternateSymbol->SetValue( conversion && entry->HasConversion() );
m_cbAlternateSymbol->Enable( entry->HasConversion() );
}
}
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSpiceModel( wxCommandEvent& event )
{
#ifdef KICAD_SPICE
@ -337,43 +292,6 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::Validate()
return false;
}
id.Parse( m_libraryNameTextCtrl->GetValue(), LIB_ID::ID_SCH );
if( !id.IsValid() )
{
DisplayErrorMessage( this, _( "Library reference is not valid." ) );
m_libraryNameTextCtrl->SetFocus();
return false;
}
else if( id != m_cmp->GetLibId() )
{
LIB_PART* alias = nullptr;
try
{
alias = Prj().SchSymbolLibTable()->LoadSymbol( id );
}
catch( ... )
{
}
if( !alias )
{
msg.Printf( _( "Symbol \"%s\" not found in library \"%s\"." ),
id.GetLibItemName().wx_str(),
id.GetLibNickname().wx_str() );
DisplayErrorMessage( this, msg );
m_libraryNameTextCtrl->SetFocus();
return false;
}
}
m_libraryNameTextCtrl->SetValue( id.Format() );
// Check for missing field names.
for( size_t i = MANDATORY_FIELDS; i < m_fields->size(); ++i )
{
@ -418,30 +336,6 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow()
// Save current flags which could be modified by next change settings
STATUS_FLAGS flags = m_cmp->GetFlags();
// Library symbol identifier
LIB_ID id;
if( id.Parse( m_libraryNameTextCtrl->GetValue(), LIB_ID::ID_SCH, true ) >= 0 )
{
msg.Printf( _( "'%s' is not a valid library indentifier." ),
m_libraryNameTextCtrl->GetValue() );
DisplayError( this, msg );
return false;
}
LIB_PART* libSymbol = Prj().SchSymbolLibTable()->LoadSymbol( id );
if( !libSymbol )
{
msg.Printf( _( "Symbol '%s' not found in symbol library '%s'." ),
id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
DisplayError( this, msg );
return false;
}
m_cmp->SetLibSymbol( libSymbol->Flatten().release() );
m_cmp->SetLibId( id );
// For symbols with multiple shapes (De Morgan representation) Set the selected shape:
if( m_cbAlternateSymbol->IsEnabled() && m_cbAlternateSymbol->GetValue() )
m_cmp->SetConvert( LIB_ITEM::LIB_CONVERT::DEMORGAN );
@ -449,27 +343,28 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow()
m_cmp->SetConvert( LIB_ITEM::LIB_CONVERT::BASE );
//Set the part selection in multiple part per package
int unit_selection = m_unitChoice->IsEnabled()
? m_unitChoice->GetSelection() + 1
: 1;
int unit_selection = m_unitChoice->IsEnabled() ? m_unitChoice->GetSelection() + 1 : 1;
m_cmp->SetUnitSelection( &GetParent()->GetCurrentSheet(), unit_selection );
m_cmp->SetUnit( unit_selection );
switch( m_rbOrientation->GetSelection() )
switch( m_orientationCtrl->GetSelection() )
{
case 0: m_cmp->SetOrientation( CMP_ORIENT_0 ); break;
case 1: m_cmp->SetOrientation( CMP_ORIENT_90 ); break;
case 2: m_cmp->SetOrientation( CMP_ORIENT_180 ); break;
case 3: m_cmp->SetOrientation( CMP_ORIENT_270 ); break;
case 2: m_cmp->SetOrientation( CMP_ORIENT_270 ); break;
case 3: m_cmp->SetOrientation( CMP_ORIENT_180 ); break;
}
switch( m_rbMirror->GetSelection() )
switch( m_mirrorCtrl->GetSelection() )
{
case 0: break;
case 1: m_cmp->SetOrientation( CMP_MIRROR_X ); break;
case 2: m_cmp->SetOrientation( CMP_MIRROR_Y ); break;
}
m_part->SetShowPinNames( m_ShowPinNameButt->GetValue() );
m_part->SetShowPinNumbers( m_ShowPinNumButt->GetValue() );
// Restore m_Flag modified by SetUnit() and other change settings
m_cmp->ClearFlags();
m_cmp->SetFlags( flags );
@ -696,71 +591,27 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnMoveDown( wxCommandEvent& event )
}
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::UpdateFieldsFromLibrary( wxCommandEvent& event )
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSymbol( wxCommandEvent& )
{
if( !m_grid->CommitPendingChanges() )
return;
EndQuasiModal( SYMBOL_PROPS_EDIT_SCHEMATIC_SYMBOL );
}
LIB_ID id;
wxString msg;
SCH_COMPONENT copy( *m_cmp );
copy.SetFields( *m_fields );
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditLibrarySymbol( wxCommandEvent& )
{
EndQuasiModal( SYMBOL_PROPS_EDIT_LIBRARY_SYMBOL );
}
id.Parse( m_libraryNameTextCtrl->GetValue(), LIB_ID::ID_SCH, true );
if( id.Parse( m_libraryNameTextCtrl->GetValue(), LIB_ID::ID_SCH, true ) >= 0 )
{
msg.Printf( _( "'%s' is not a valid library indentifier." ),
m_libraryNameTextCtrl->GetValue() );
DisplayError( this, msg );
return;
}
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnUpdateSymbol( wxCommandEvent& )
{
EndQuasiModal( SYMBOL_PROPS_WANT_UPDATE_SYMBOL );
}
LIB_PART* libSymbol = Prj().SchSymbolLibTable()->LoadSymbol( id );
if( !libSymbol )
{
msg.Printf( _( "Symbol '%s' not found in symbol library '%s'." ),
id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
DisplayError( this, msg );
return;
}
copy.SetLibSymbol( libSymbol->Flatten().release() );
// Update the requested fields in the component copy
InvokeDialogUpdateFields( GetParent(), &copy, false );
wxGridTableMessage clear( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, m_fields->size() );
m_grid->ProcessTableMessage( clear );
// Copy fields from the component copy to the dialog buffer
m_fields->clear();
std::set<wxString> defined;
for( int i = 0; i < copy.GetFieldCount(); ++i )
{
copy.GetField( i )->SetParent( m_cmp );
defined.insert( copy.GetField( i )->GetName() );
m_fields->push_back( *copy.GetField( i ) );
}
// Add in any template fieldnames not yet defined:
for( const TEMPLATE_FIELDNAME& templateFieldname :
GetParent()->Schematic().Settings().m_TemplateFieldNames.GetTemplateFieldNames() )
{
if( defined.count( templateFieldname.m_Name ) <= 0 )
{
SCH_FIELD field( wxPoint( 0, 0 ), -1, m_cmp, templateFieldname.m_Name );
field.SetVisible( templateFieldname.m_Visible );
m_fields->push_back( field );
}
}
wxGridTableMessage refresh( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_fields->size() );
m_grid->ProcessTableMessage( refresh );
void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnExchangeSymbol( wxCommandEvent& )
{
EndQuasiModal( SYMBOL_PROPS_WANT_EXCHANGE_SYMBOL );
}

View File

@ -34,6 +34,17 @@ class SCH_EDIT_FRAME;
class LIB_PART;
// The dialog can be closed for several reasons.
enum SYMBOL_PROPS_RETVALUE
{
SYMBOL_PROPS_WANT_UPDATE_SYMBOL,
SYMBOL_PROPS_WANT_EXCHANGE_SYMBOL,
SYMBOL_PROPS_EDIT_OK,
SYMBOL_PROPS_EDIT_SCHEMATIC_SYMBOL,
SYMBOL_PROPS_EDIT_LIBRARY_SYMBOL
};
/**
* Dialog used to edit #SCH_COMPONENT objects in a schematic.
*
@ -49,28 +60,16 @@ public:
SCH_EDIT_FRAME* GetParent();
private:
SCH_COMPONENT* m_cmp;
LIB_PART* m_part;
int m_width;
int m_delayedFocusRow;
int m_delayedFocusColumn;
wxString m_shownColumns;
FIELDS_GRID_TABLE<SCH_FIELD>* m_fields;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
bool Validate() override;
// event handlers
void UpdateFieldsFromLibrary( wxCommandEvent& event ) override;
void OnAddField( wxCommandEvent& event ) override;
void OnDeleteField( wxCommandEvent& event ) override;
void OnMoveUp( wxCommandEvent& event ) override;
void OnMoveDown( wxCommandEvent& event ) override;
void OnBrowseLibrary( wxCommandEvent& event ) override;
void OnEditSpiceModel( wxCommandEvent& event ) override;
void OnEditPinTable( wxCommandEvent& event ) override;
void OnSizeGrid( wxSizeEvent& event ) override;
@ -79,7 +78,23 @@ private:
void OnCancelButtonClick( wxCommandEvent& event ) override;
void OnInitDlg( wxInitDialogEvent& event ) override;
void OnEditSymbol( wxCommandEvent& ) override;
void OnEditLibrarySymbol( wxCommandEvent& ) override;
void OnUpdateSymbol( wxCommandEvent& ) override;
void OnExchangeSymbol( wxCommandEvent& ) override;
void AdjustGridColumns( int aWidth );
private:
SCH_COMPONENT* m_cmp;
LIB_PART* m_part;
int m_width;
int m_delayedFocusRow;
int m_delayedFocusColumn;
wxString m_shownColumns;
FIELDS_GRID_TABLE<SCH_FIELD>* m_fields;
};
#endif // _DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_H_

View File

@ -100,108 +100,136 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE
bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
m_updateFieldValues = new wxButton( sbFields->GetStaticBox(), wxID_ANY, _("Update Fields from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
m_updateFieldValues->SetToolTip( _("Sets fields to the original library values") );
bButtonSize->Add( m_updateFieldValues, 0, wxEXPAND, 5 );
sbFields->Add( bButtonSize, 0, wxALL|wxEXPAND, 5 );
mainSizer->Add( sbFields, 1, wxALL|wxEXPAND, 5 );
mainSizer->Add( sbFields, 1, wxALL|wxEXPAND, 10 );
wxBoxSizer* lowerSizer;
lowerSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLowerSizer;
bLowerSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbSizerLibraryReference;
sbSizerLibraryReference = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Symbol") ), wxVERTICAL );
wxStaticBoxSizer* sbGeneralProps;
sbGeneralProps = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("General") ), wxHORIZONTAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 5, 2, 0, 0 );
fgSizer1->AddGrowableCol( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 3, 3 );
gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gbSizer1->SetEmptyCellSize( wxSize( -1,10 ) );
m_staticText3 = new wxStaticText( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, _("Library Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
wxBoxSizer* bLibraryReferenceSizer;
bLibraryReferenceSizer = new wxBoxSizer( wxHORIZONTAL );
m_libraryNameTextCtrl = new wxTextCtrl( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_libraryNameTextCtrl->SetToolTip( _("Name of the symbol in the library to which this symbol is linked") );
bLibraryReferenceSizer->Add( m_libraryNameTextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_buttonBrowseLibrary = new wxBitmapButton( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_buttonBrowseLibrary->SetToolTip( _("Browse library") );
bLibraryReferenceSizer->Add( m_buttonBrowseLibrary, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizer1->Add( bLibraryReferenceSizer, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
m_unitLabel = new wxStaticText( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, _("Unit:"), wxDefaultPosition, wxDefaultSize, 0 );
m_unitLabel = new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Unit:"), wxDefaultPosition, wxDefaultSize, 0 );
m_unitLabel->Wrap( -1 );
fgSizer1->Add( m_unitLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
gbSizer1->Add( m_unitLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT, 5 );
wxArrayString m_unitChoiceChoices;
m_unitChoice = new wxChoice( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitChoiceChoices, 0 );
m_unitChoice = new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitChoiceChoices, 0 );
m_unitChoice->SetSelection( 0 );
m_unitChoice->SetMinSize( wxSize( 100,-1 ) );
fgSizer1->Add( m_unitChoice, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
gbSizer1->Add( m_unitChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer1->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_cbAlternateSymbol = new wxCheckBox( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, _("Alternate symbol (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbAlternateSymbol = new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Alternate symbol (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbAlternateSymbol->SetToolTip( _("Use the alternate shape of this symbol.\nFor gates, this is the \"De Morgan\" conversion") );
fgSizer1->Add( m_cbAlternateSymbol, 0, wxRIGHT|wxTOP, 5 );
gbSizer1->Add( m_cbAlternateSymbol, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
m_orientationLabel = new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Angle:"), wxDefaultPosition, wxDefaultSize, 0 );
m_orientationLabel->Wrap( -1 );
gbSizer1->Add( m_orientationLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT, 5 );
wxString m_orientationCtrlChoices[] = { _("0"), _("+90"), _("-90"), _("180") };
int m_orientationCtrlNChoices = sizeof( m_orientationCtrlChoices ) / sizeof( wxString );
m_orientationCtrl = new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_orientationCtrlNChoices, m_orientationCtrlChoices, 0 );
m_orientationCtrl->SetSelection( 0 );
gbSizer1->Add( m_orientationCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
m_mirrorLabel = new wxStaticText( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Mirror:"), wxDefaultPosition, wxDefaultSize, 0 );
m_mirrorLabel->Wrap( -1 );
gbSizer1->Add( m_mirrorLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT, 5 );
wxString m_mirrorCtrlChoices[] = { _("Not mirrored"), _("Around X axis"), _("Around Y axis") };
int m_mirrorCtrlNChoices = sizeof( m_mirrorCtrlChoices ) / sizeof( wxString );
m_mirrorCtrl = new wxChoice( sbGeneralProps->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_mirrorCtrlNChoices, m_mirrorCtrlChoices, 0 );
m_mirrorCtrl->SetSelection( 0 );
gbSizer1->Add( m_mirrorCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
gbSizer1->AddGrowableCol( 1 );
m_cbExcludeFromBom = new wxCheckBox( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
sbGeneralProps->Add( gbSizer1, 1, wxEXPAND, 5 );
bLowerSizer->Add( sbGeneralProps, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bMiddleCol;
bMiddleCol = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerPinTextOpts;
sbSizerPinTextOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pin Text") ), wxVERTICAL );
m_ShowPinNumButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin numbers"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowPinNumButt->SetValue(true);
m_ShowPinNumButt->SetToolTip( _("Show or hide pin numbers") );
sbSizerPinTextOpts->Add( m_ShowPinNumButt, 0, wxRIGHT|wxLEFT, 4 );
m_ShowPinNameButt = new wxCheckBox( sbSizerPinTextOpts->GetStaticBox(), wxID_ANY, _("Show pin names"), wxDefaultPosition, wxDefaultSize, 0 );
m_ShowPinNameButt->SetValue(true);
m_ShowPinNameButt->SetToolTip( _("Show or hide pin names") );
sbSizerPinTextOpts->Add( m_ShowPinNameButt, 0, wxALL, 4 );
bMiddleCol->Add( sbSizerPinTextOpts, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbAttributes;
sbAttributes = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Attributes") ), wxVERTICAL );
m_cbExcludeFromBom = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from bill of materials"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbExcludeFromBom->SetToolTip( _("This is useful for adding symbols for board footprints such as fiducials\nand logos that you do not want to appear in the bill of materials export") );
fgSizer1->Add( m_cbExcludeFromBom, 0, 0, 5 );
sbAttributes->Add( m_cbExcludeFromBom, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
m_cbExcludeFromBoard = new wxCheckBox( sbSizerLibraryReference->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbExcludeFromBoard = new wxCheckBox( sbAttributes->GetStaticBox(), wxID_ANY, _("Exclude from board"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbExcludeFromBoard->SetToolTip( _("This is useful for adding symbols that only get exported to the bill of materials but\nnot required to layout the board such as mechanical fasteners and enclosures") );
fgSizer1->Add( m_cbExcludeFromBoard, 0, wxBOTTOM, 5 );
sbAttributes->Add( m_cbExcludeFromBoard, 0, wxBOTTOM|wxRIGHT|wxLEFT, 4 );
sbSizerLibraryReference->Add( fgSizer1, 0, wxEXPAND, 5 );
bMiddleCol->Add( sbAttributes, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
lowerSizer->Add( sbSizerLibraryReference, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bLowerSizer->Add( bMiddleCol, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxString m_rbOrientationChoices[] = { _("0"), _("+90"), _("+180"), _("-90") };
int m_rbOrientationNChoices = sizeof( m_rbOrientationChoices ) / sizeof( wxString );
m_rbOrientation = new wxRadioBox( this, wxID_ANY, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_rbOrientationNChoices, m_rbOrientationChoices, 1, wxRA_SPECIFY_COLS );
m_rbOrientation->SetSelection( 0 );
m_rbOrientation->SetToolTip( _("Select if the symbol is to be rotated when drawn") );
wxBoxSizer* buttonsSizer;
buttonsSizer = new wxBoxSizer( wxVERTICAL );
lowerSizer->Add( m_rbOrientation, 2, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_updateSymbolBtn = new wxButton( this, wxID_ANY, _("Update Symbol from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
buttonsSizer->Add( m_updateSymbolBtn, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_rbMirrorChoices[] = { _("Default"), _("Mirror around X axis"), _("Mirror around Y axis") };
int m_rbMirrorNChoices = sizeof( m_rbMirrorChoices ) / sizeof( wxString );
m_rbMirror = new wxRadioBox( this, wxID_ANY, _("Aspect"), wxDefaultPosition, wxDefaultSize, m_rbMirrorNChoices, m_rbMirrorChoices, 1, wxRA_SPECIFY_COLS );
m_rbMirror->SetSelection( 1 );
m_rbMirror->SetToolTip( _("Pick the graphical transformation to be used when displaying the symbol") );
m_changeSymbolBtn = new wxButton( this, wxID_ANY, _("Change Symbol..."), wxDefaultPosition, wxDefaultSize, 0 );
buttonsSizer->Add( m_changeSymbolBtn, 0, wxEXPAND|wxALL, 5 );
lowerSizer->Add( m_rbMirror, 2, wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_editSchematicSymbolBtn = new wxButton( this, wxID_ANY, _("Edit Symbol..."), wxDefaultPosition, wxDefaultSize, 0 );
buttonsSizer->Add( m_editSchematicSymbolBtn, 0, wxEXPAND|wxALL, 5 );
m_pinTableButton = new wxButton( this, wxID_ANY, _("Alternate Pin Assignments..."), wxDefaultPosition, wxDefaultSize, 0 );
m_pinTableButton->SetMinSize( wxSize( 112,-1 ) );
buttonsSizer->Add( m_pinTableButton, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
mainSizer->Add( lowerSizer, 0, wxEXPAND|wxBOTTOM, 5 );
buttonsSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_editLibrarySymbolBtn = new wxButton( this, wxID_ANY, _("Edit Library Symbol..."), wxDefaultPosition, wxDefaultSize, 0 );
buttonsSizer->Add( m_editLibrarySymbolBtn, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bLowerSizer->Add( buttonsSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
mainSizer->Add( bLowerSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
@ -209,18 +237,29 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE
wxBoxSizer* bSizerBottom;
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLibLink;
bLibLink = new wxBoxSizer( wxHORIZONTAL );
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 );
m_tcLibraryID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxBORDER_NONE );
m_tcLibraryID->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
m_tcLibraryID->SetToolTip( _("The library ID and footprint ID currently assigned. Use “Change Footprint…” to assign a different footprint.") );
bLibLink->Add( m_tcLibraryID, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bSizerBottom->Add( bLibLink, 1, wxEXPAND|wxLEFT, 10 );
bSizerBottom->Add( 20, 0, 0, wxEXPAND, 5 );
m_spiceFieldsButton = new wxButton( this, wxID_ANY, _("Spice Model..."), wxDefaultPosition, wxDefaultSize, 0 );
m_spiceFieldsButton->SetMinSize( wxSize( 112,-1 ) );
bSizerBottom->Add( m_spiceFieldsButton, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL, 10 );
m_pinTableButton = new wxButton( this, wxID_ANY, _("Pin Table..."), wxDefaultPosition, wxDefaultSize, 0 );
m_pinTableButton->SetMinSize( wxSize( 112,-1 ) );
bSizerBottom->Add( m_pinTableButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bSizerBottom->Add( 10, 0, 1, wxEXPAND, 5 );
bSizerBottom->Add( m_spiceFieldsButton, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
m_stdDialogButtonSizer = new wxStdDialogButtonSizer();
m_stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
@ -247,10 +286,12 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE
m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveUp ), NULL, this );
m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveDown ), NULL, this );
m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnDeleteField ), NULL, this );
m_updateFieldValues->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::UpdateFieldsFromLibrary ), NULL, this );
m_buttonBrowseLibrary->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnBrowseLibrary ), NULL, this );
m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSpiceModel ), NULL, this );
m_updateSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnUpdateSymbol ), NULL, this );
m_changeSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnExchangeSymbol ), NULL, this );
m_editSchematicSymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSymbol ), NULL, this );
m_pinTableButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditPinTable ), NULL, this );
m_editLibrarySymbolBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditLibrarySymbol ), NULL, this );
m_spiceFieldsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSpiceModel ), NULL, this );
m_stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnCancelButtonClick ), NULL, this );
}
@ -264,10 +305,12 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BAS
m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveUp ), NULL, this );
m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnMoveDown ), NULL, this );
m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnDeleteField ), NULL, this );
m_updateFieldValues->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::UpdateFieldsFromLibrary ), NULL, this );
m_buttonBrowseLibrary->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnBrowseLibrary ), NULL, this );
m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSpiceModel ), NULL, this );
m_updateSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnUpdateSymbol ), NULL, this );
m_changeSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnExchangeSymbol ), NULL, this );
m_editSchematicSymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSymbol ), NULL, this );
m_pinTableButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditPinTable ), NULL, this );
m_editLibrarySymbolBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditLibrarySymbol ), NULL, this );
m_spiceFieldsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnEditSpiceModel ), NULL, this );
m_stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::OnCancelButtonClick ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -27,11 +27,11 @@ class WX_GRID;
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/radiobox.h>
#include <wx/gbsizer.h>
#include <wx/statline.h>
#include <wx/textctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
@ -50,20 +50,26 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE : public DIALOG_SHIM
wxBitmapButton* m_bpMoveUp;
wxBitmapButton* m_bpMoveDown;
wxBitmapButton* m_bpDelete;
wxButton* m_updateFieldValues;
wxStaticText* m_staticText3;
wxTextCtrl* m_libraryNameTextCtrl;
wxBitmapButton* m_buttonBrowseLibrary;
wxStaticText* m_unitLabel;
wxChoice* m_unitChoice;
wxCheckBox* m_cbAlternateSymbol;
wxStaticText* m_orientationLabel;
wxChoice* m_orientationCtrl;
wxStaticText* m_mirrorLabel;
wxChoice* m_mirrorCtrl;
wxCheckBox* m_ShowPinNumButt;
wxCheckBox* m_ShowPinNameButt;
wxCheckBox* m_cbExcludeFromBom;
wxCheckBox* m_cbExcludeFromBoard;
wxRadioBox* m_rbOrientation;
wxRadioBox* m_rbMirror;
wxStaticLine* m_staticline1;
wxButton* m_spiceFieldsButton;
wxButton* m_updateSymbolBtn;
wxButton* m_changeSymbolBtn;
wxButton* m_editSchematicSymbolBtn;
wxButton* m_pinTableButton;
wxButton* m_editLibrarySymbolBtn;
wxStaticLine* m_staticline1;
wxStaticText* m_libraryIDLabel;
wxTextCtrl* m_tcLibraryID;
wxButton* m_spiceFieldsButton;
wxStdDialogButtonSizer* m_stdDialogButtonSizer;
wxButton* m_stdDialogButtonSizerOK;
wxButton* m_stdDialogButtonSizerCancel;
@ -76,10 +82,12 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE : public DIALOG_SHIM
virtual void OnMoveUp( wxCommandEvent& event ) { event.Skip(); }
virtual void OnMoveDown( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDeleteField( wxCommandEvent& event ) { event.Skip(); }
virtual void UpdateFieldsFromLibrary( wxCommandEvent& event ) { event.Skip(); }
virtual void OnBrowseLibrary( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditSpiceModel( wxCommandEvent& event ) { event.Skip(); }
virtual void OnUpdateSymbol( wxCommandEvent& event ) { event.Skip(); }
virtual void OnExchangeSymbol( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditSymbol( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditPinTable( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditLibrarySymbol( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditSpiceModel( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }

View File

@ -22,6 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <kiway.h>
#include <tool/picker_tool.h>
#include <tools/sch_edit_tool.h>
#include <tools/ee_selection_tool.h>
@ -1417,13 +1418,15 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
case SCH_COMPONENT_T:
{
SCH_COMPONENT* component = (SCH_COMPONENT*) item;
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC dlg( m_frame, component );
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC symbolPropsDialog( m_frame, component );
// This dialog itself subsequently can invoke a KIWAY_PLAYER as a quasimodal
// frame. Therefore this dialog as a modal frame parent, MUST be run under
// quasimodal mode for the quasimodal frame support to work. So don't use
// the QUASIMODAL macros here.
if( dlg.ShowQuasiModal() == wxID_OK )
int retval = symbolPropsDialog.ShowQuasiModal();
if( retval == SYMBOL_PROPS_EDIT_OK )
{
if( m_frame->eeconfig()->m_AutoplaceFields.enable )
component->AutoAutoplaceFields( m_frame->GetScreen() );
@ -1431,6 +1434,37 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
m_frame->OnModify();
}
else if( retval == SYMBOL_PROPS_EDIT_SCHEMATIC_SYMBOL )
{
auto editor = (LIB_EDIT_FRAME*) m_frame->Kiway().Player( FRAME_SCH_LIB_EDITOR, true );
editor->LoadSymbolFromSchematic( component->GetPartRef(),
component->GetRef( &m_frame->GetCurrentSheet() ),
component->GetUnit(), component->GetConvert() );
editor->Show( true );
editor->Raise();
}
else if( retval == SYMBOL_PROPS_EDIT_LIBRARY_SYMBOL )
{
auto editor = (LIB_EDIT_FRAME*) m_frame->Kiway().Player( FRAME_SCH_LIB_EDITOR, true );
editor->LoadComponentAndSelectLib( component->GetLibId(), component->GetUnit(),
component->GetConvert() );
editor->Show( true );
editor->Raise();
}
else if( retval == SYMBOL_PROPS_WANT_UPDATE_SYMBOL )
{
DIALOG_CHANGE_SYMBOLS dlg( m_frame, component, DIALOG_CHANGE_SYMBOLS::MODE::UPDATE );
dlg.ShowModal();
}
else if( retval == SYMBOL_PROPS_WANT_EXCHANGE_SYMBOL )
{
DIALOG_CHANGE_SYMBOLS dlg( m_frame, component, DIALOG_CHANGE_SYMBOLS::MODE::CHANGE );
dlg.ShowModal();
}
}
break;