Loading eeschema/CMakeLists.txt +8 −9 Original line number Diff line number Diff line Loading @@ -39,14 +39,14 @@ set(EESCHEMA_SRCS dialogs/dialog_lib_edit_text_base.cpp dialogs/dialog_build_BOM.cpp dialogs/dialog_build_BOM_base.cpp dialog_edit_component_in_lib.cpp dialog_edit_component_in_lib_base.cpp dialog_edit_component_in_schematic_fbp.cpp dialog_edit_component_in_schematic.cpp dialog_edit_label.cpp dialog_edit_label_base.cpp dialog_edit_libentry_fields_in_lib.cpp dialog_edit_libentry_fields_in_lib_base.cpp dialogs/dialog_edit_component_in_lib.cpp dialogs/dialog_edit_component_in_lib_base.cpp dialogs/dialog_edit_component_in_schematic_fbp.cpp dialogs/dialog_edit_component_in_schematic.cpp dialogs/dialog_edit_label.cpp dialogs/dialog_edit_label_base.cpp dialogs/dialog_edit_libentry_fields_in_lib.cpp dialogs/dialog_edit_libentry_fields_in_lib_base.cpp dialog_eeschema_config.cpp dialog_eeschema_config_fbp.cpp dialog_eeschema_options_base.cpp Loading @@ -69,7 +69,6 @@ set(EESCHEMA_SRCS dialogs/dialog_schematic_find_base.cpp dialogs/dialog_SVG_print.cpp dialogs/dialog_SVG_print_base.cpp edit_component_in_lib.cpp edit_component_in_schematic.cpp edit_label.cpp eelayer.cpp Loading eeschema/dialog_edit_component_in_lib.cppdeleted 100644 → 0 +0 −156 Original line number Diff line number Diff line ///////////////////////////////////////////////////////////////////////////// // Name: dialog_edit_component_in_lib.cpp // Author: jean-pierre Charras // Licence: GPL ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" #include "common.h" #include "confirm.h" #include "gestfich.h" #include "general.h" #include "protos.h" #include "libeditframe.h" #include "class_library.h" #include "dialog_edit_component_in_lib.h" DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( WinEDA_LibeditFrame* aParent): DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE(aParent) { m_Parent = aParent; m_RecreateToolbar = false; Init(); if( GetSizer() ) { GetSizer()->SetSizeHints( this ); } } DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY() { } /* Initialize state of check boxes and texts */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::Init() { SetFocus(); m_AliasLocation = -1; LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) { SetTitle( _( "Library Component Properties" ) ); return; } wxString title = _( "Properties for " ); bool isRoot = m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0; if( !isRoot ) { title += m_Parent->GetAliasName() + _( " (alias of " ) + component->GetName() + wxT( ")" ); } else { title += component->GetName(); } SetTitle( title ); InitPanelDoc(); InitBasicPanel(); if( isRoot && component->GetAliasCount() == 1 ) m_ButtonDeleteAllAlias->Enable( false ); /* Place list of alias names in listbox */ m_PartAliasListCtrl->Append( component->GetAliasNames( false ) ); if( component->GetAliasCount() <= 1 ) { m_ButtonDeleteAllAlias->Enable( false ); m_ButtonDeleteOneAlias->Enable( false ); } /* Read the Footprint Filter list */ m_FootprintFilterListBox->Append( component->GetFootPrints() ); if( component->GetFootPrints().GetCount() == 0 ) { m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false ); } } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitPanelDoc() { LIB_ALIAS* alias; LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) return; wxString aliasname = m_Parent->GetAliasName(); if( aliasname.IsEmpty() ) return; alias = component->GetAlias( aliasname ); if( alias != NULL ) { m_DocCtrl->SetValue( alias->GetDescription() ); m_KeywordsCtrl->SetValue( alias->GetKeyWords() ); m_DocfileCtrl->SetValue( alias->GetDocFileName() ); } } /* * create the basic panel for component properties editing */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitBasicPanel() { LIB_COMPONENT* component = m_Parent->GetComponent(); if( m_Parent->GetShowDeMorgan() ) m_AsConvertButt->SetValue( true ); /* Default values for a new component. */ if( component == NULL ) { m_ShowPinNumButt->SetValue( true ); m_ShowPinNameButt->SetValue( true ); m_PinsNameInsideButt->SetValue( true ); m_SelNumberOfUnits->SetValue( 1 ); m_SetSkew->SetValue( 40 ); m_OptionPower->SetValue( false ); m_OptionPartsLocked->SetValue( false ); return; } m_ShowPinNumButt->SetValue( component->ShowPinNumbers() ); m_ShowPinNameButt->SetValue( component->ShowPinNames() ); m_PinsNameInsideButt->SetValue( component->GetPinNameOffset() != 0 ); m_SelNumberOfUnits->SetValue( component->GetPartCount() ); m_SetSkew->SetValue( component->GetPinNameOffset() ); m_OptionPower->SetValue( component->IsPower() ); m_OptionPartsLocked->SetValue( component->UnitsLocked() && component->GetPartCount() > 1 ); } eeschema/edit_component_in_lib.cpp→eeschema/dialogs/dialog_edit_component_in_lib.cpp +139 −31 Original line number Diff line number Diff line /**************************************************************/ /* librairy editor: edition of component general properties */ /**************************************************************/ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_edit_component_in_lib.cpp // Author: jean-pierre Charras // Licence: GPL ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" #include "appl_wxstruct.h" #include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" #include "wxEeschemaStruct.h" #include "appl_wxstruct.h" #include "general.h" #include "protos.h" #include "libeditframe.h" #include "class_library.h" #include "eeschema_id.h" #include "dialog_edit_component_in_lib.h" DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( WinEDA_LibeditFrame* aParent ): DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( aParent ) { m_Parent = aParent; m_RecreateToolbar = false; Init(); if( GetSizer() ) { GetSizer()->SetSizeHints( this ); } } /* Dialog box to edit a libentry (a component in library) properties */ /* Creates a NoteBook dialog * Edition: * Doc and keys words * Parts per package * General properties * Fields are NOT edited here. There is a specific dialog box to do that DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY() { } /* Initialize state of check boxes and texts */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::Init() { SetFocus(); m_AliasLocation = -1; #include "dialog_edit_component_in_lib.h" LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) { SetTitle( _( "Library Component Properties" ) ); return; } wxString title = _( "Properties for " ); bool isRoot = m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0; void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event ) if( !isRoot ) { title += m_Parent->GetAliasName() + _( " (alias of " ) + component->GetName() + wxT( ")" ); } else { bool partLocked = GetComponent()->UnitsLocked(); title += component->GetName(); } DIALOG_EDIT_COMPONENT_IN_LIBRARY dlg( this ); SetTitle( title ); InitPanelDoc(); InitBasicPanel(); if( dlg.ShowModal() == wxID_CANCEL ) if( isRoot && component->GetAliasCount() == 1 ) m_ButtonDeleteAllAlias->Enable( false ); /* Place list of alias names in listbox */ m_PartAliasListCtrl->Append( component->GetAliasNames( false ) ); if( component->GetAliasCount() <= 1 ) { m_ButtonDeleteAllAlias->Enable( false ); m_ButtonDeleteOneAlias->Enable( false ); } /* Read the Footprint Filter list */ m_FootprintFilterListBox->Append( component->GetFootPrints() ); if( component->GetFootPrints().GetCount() == 0 ) { m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false ); } m_sdbSizer2OK->SetDefault(); } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitPanelDoc() { LIB_ALIAS* alias; LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) return; wxString aliasname = m_Parent->GetAliasName(); if( aliasname.IsEmpty() ) return; if( partLocked != GetComponent()->UnitsLocked() ) alias = component->GetAlias( aliasname ); if( alias != NULL ) { // g_EditPinByPinIsOn is set to the better value, if m_UnitSelectionLocked has changed g_EditPinByPinIsOn = GetComponent()->UnitsLocked() ? true : false; m_DocCtrl->SetValue( alias->GetDescription() ); m_KeywordsCtrl->SetValue( alias->GetKeyWords() ); m_DocfileCtrl->SetValue( alias->GetDocFileName() ); } } /* * create the basic panel for component properties editing */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitBasicPanel() { LIB_COMPONENT* component = m_Parent->GetComponent(); if( m_Parent->GetShowDeMorgan() ) m_AsConvertButt->SetValue( true ); /* Default values for a new component. */ if( component == NULL ) { m_ShowPinNumButt->SetValue( true ); m_ShowPinNameButt->SetValue( true ); m_PinsNameInsideButt->SetValue( true ); m_SelNumberOfUnits->SetValue( 1 ); m_SetSkew->SetValue( 40 ); m_OptionPower->SetValue( false ); m_OptionPartsLocked->SetValue( false ); return; } UpdateAliasSelectList(); UpdatePartSelectList(); DisplayLibInfos(); DisplayCmpDoc(); OnModify(); DrawPanel->Refresh(); m_ShowPinNumButt->SetValue( component->ShowPinNumbers() ); m_ShowPinNameButt->SetValue( component->ShowPinNames() ); m_PinsNameInsideButt->SetValue( component->GetPinNameOffset() != 0 ); m_SelNumberOfUnits->SetValue( component->GetPartCount() ); m_SetSkew->SetValue( component->GetPinNameOffset() ); m_OptionPower->SetValue( component->IsPower() ); m_OptionPartsLocked->SetValue( component->UnitsLocked() && component->GetPartCount() > 1 ); } Loading Loading @@ -124,6 +227,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event ) /* Set the option "Units locked". * Obviously, cannot be true if there is only one part */ component->LockUnits( m_OptionPartsLocked->GetValue() ); if( component->GetPartCount() <= 1 ) component->LockUnits( false ); Loading Loading @@ -190,6 +294,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED return; wxTextEntryDialog dlg( this, _( "New alias:" ), _( "Component Alias" ), aliasname ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user Loading @@ -211,8 +316,10 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED } m_PartAliasListCtrl->Append( aliasname ); if( m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0 ) m_ButtonDeleteAllAlias->Enable( true ); m_ButtonDeleteOneAlias->Enable( true ); } Loading @@ -223,6 +330,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAliasOfPart( wxCommandEvent& WXUNUS if( aliasname.IsEmpty() ) return; if( aliasname.CmpNoCase( m_Parent->GetAliasName() ) == 0 ) { wxString msg; Loading @@ -234,6 +342,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAliasOfPart( wxCommandEvent& WXUNUS m_PartAliasListCtrl->Delete( m_PartAliasListCtrl->GetSelection() ); LIB_COMPONENT* component = m_Parent->GetComponent(); if( component ) component->RemoveAlias( aliasname ); Loading Loading @@ -271,8 +380,7 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::SetUnsetConvert() { LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL || ( m_Parent->GetShowDeMorgan() == component->HasConversion() ) ) if( component == NULL || ( m_Parent->GetShowDeMorgan() == component->HasConversion() ) ) return false; if( m_Parent->GetShowDeMorgan() ) Loading eeschema/dialog_edit_component_in_lib.h→eeschema/dialogs/dialog_edit_component_in_lib.h +0 −0 File moved. View file eeschema/dialog_edit_component_in_lib_base.cpp→eeschema/dialogs/dialog_edit_component_in_lib_base.cpp +0 −0 File moved. View file Loading
eeschema/CMakeLists.txt +8 −9 Original line number Diff line number Diff line Loading @@ -39,14 +39,14 @@ set(EESCHEMA_SRCS dialogs/dialog_lib_edit_text_base.cpp dialogs/dialog_build_BOM.cpp dialogs/dialog_build_BOM_base.cpp dialog_edit_component_in_lib.cpp dialog_edit_component_in_lib_base.cpp dialog_edit_component_in_schematic_fbp.cpp dialog_edit_component_in_schematic.cpp dialog_edit_label.cpp dialog_edit_label_base.cpp dialog_edit_libentry_fields_in_lib.cpp dialog_edit_libentry_fields_in_lib_base.cpp dialogs/dialog_edit_component_in_lib.cpp dialogs/dialog_edit_component_in_lib_base.cpp dialogs/dialog_edit_component_in_schematic_fbp.cpp dialogs/dialog_edit_component_in_schematic.cpp dialogs/dialog_edit_label.cpp dialogs/dialog_edit_label_base.cpp dialogs/dialog_edit_libentry_fields_in_lib.cpp dialogs/dialog_edit_libentry_fields_in_lib_base.cpp dialog_eeschema_config.cpp dialog_eeschema_config_fbp.cpp dialog_eeschema_options_base.cpp Loading @@ -69,7 +69,6 @@ set(EESCHEMA_SRCS dialogs/dialog_schematic_find_base.cpp dialogs/dialog_SVG_print.cpp dialogs/dialog_SVG_print_base.cpp edit_component_in_lib.cpp edit_component_in_schematic.cpp edit_label.cpp eelayer.cpp Loading
eeschema/dialog_edit_component_in_lib.cppdeleted 100644 → 0 +0 −156 Original line number Diff line number Diff line ///////////////////////////////////////////////////////////////////////////// // Name: dialog_edit_component_in_lib.cpp // Author: jean-pierre Charras // Licence: GPL ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" #include "common.h" #include "confirm.h" #include "gestfich.h" #include "general.h" #include "protos.h" #include "libeditframe.h" #include "class_library.h" #include "dialog_edit_component_in_lib.h" DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( WinEDA_LibeditFrame* aParent): DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE(aParent) { m_Parent = aParent; m_RecreateToolbar = false; Init(); if( GetSizer() ) { GetSizer()->SetSizeHints( this ); } } DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY() { } /* Initialize state of check boxes and texts */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::Init() { SetFocus(); m_AliasLocation = -1; LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) { SetTitle( _( "Library Component Properties" ) ); return; } wxString title = _( "Properties for " ); bool isRoot = m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0; if( !isRoot ) { title += m_Parent->GetAliasName() + _( " (alias of " ) + component->GetName() + wxT( ")" ); } else { title += component->GetName(); } SetTitle( title ); InitPanelDoc(); InitBasicPanel(); if( isRoot && component->GetAliasCount() == 1 ) m_ButtonDeleteAllAlias->Enable( false ); /* Place list of alias names in listbox */ m_PartAliasListCtrl->Append( component->GetAliasNames( false ) ); if( component->GetAliasCount() <= 1 ) { m_ButtonDeleteAllAlias->Enable( false ); m_ButtonDeleteOneAlias->Enable( false ); } /* Read the Footprint Filter list */ m_FootprintFilterListBox->Append( component->GetFootPrints() ); if( component->GetFootPrints().GetCount() == 0 ) { m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false ); } } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitPanelDoc() { LIB_ALIAS* alias; LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) return; wxString aliasname = m_Parent->GetAliasName(); if( aliasname.IsEmpty() ) return; alias = component->GetAlias( aliasname ); if( alias != NULL ) { m_DocCtrl->SetValue( alias->GetDescription() ); m_KeywordsCtrl->SetValue( alias->GetKeyWords() ); m_DocfileCtrl->SetValue( alias->GetDocFileName() ); } } /* * create the basic panel for component properties editing */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitBasicPanel() { LIB_COMPONENT* component = m_Parent->GetComponent(); if( m_Parent->GetShowDeMorgan() ) m_AsConvertButt->SetValue( true ); /* Default values for a new component. */ if( component == NULL ) { m_ShowPinNumButt->SetValue( true ); m_ShowPinNameButt->SetValue( true ); m_PinsNameInsideButt->SetValue( true ); m_SelNumberOfUnits->SetValue( 1 ); m_SetSkew->SetValue( 40 ); m_OptionPower->SetValue( false ); m_OptionPartsLocked->SetValue( false ); return; } m_ShowPinNumButt->SetValue( component->ShowPinNumbers() ); m_ShowPinNameButt->SetValue( component->ShowPinNames() ); m_PinsNameInsideButt->SetValue( component->GetPinNameOffset() != 0 ); m_SelNumberOfUnits->SetValue( component->GetPartCount() ); m_SetSkew->SetValue( component->GetPinNameOffset() ); m_OptionPower->SetValue( component->IsPower() ); m_OptionPartsLocked->SetValue( component->UnitsLocked() && component->GetPartCount() > 1 ); }
eeschema/edit_component_in_lib.cpp→eeschema/dialogs/dialog_edit_component_in_lib.cpp +139 −31 Original line number Diff line number Diff line /**************************************************************/ /* librairy editor: edition of component general properties */ /**************************************************************/ ///////////////////////////////////////////////////////////////////////////// // Name: dialog_edit_component_in_lib.cpp // Author: jean-pierre Charras // Licence: GPL ///////////////////////////////////////////////////////////////////////////// #include "fctsys.h" #include "appl_wxstruct.h" #include "common.h" #include "macros.h" #include "class_drawpanel.h" #include "confirm.h" #include "gestfich.h" #include "wxEeschemaStruct.h" #include "appl_wxstruct.h" #include "general.h" #include "protos.h" #include "libeditframe.h" #include "class_library.h" #include "eeschema_id.h" #include "dialog_edit_component_in_lib.h" DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( WinEDA_LibeditFrame* aParent ): DIALOG_EDIT_COMPONENT_IN_LIBRARY_BASE( aParent ) { m_Parent = aParent; m_RecreateToolbar = false; Init(); if( GetSizer() ) { GetSizer()->SetSizeHints( this ); } } /* Dialog box to edit a libentry (a component in library) properties */ /* Creates a NoteBook dialog * Edition: * Doc and keys words * Parts per package * General properties * Fields are NOT edited here. There is a specific dialog box to do that DIALOG_EDIT_COMPONENT_IN_LIBRARY::~DIALOG_EDIT_COMPONENT_IN_LIBRARY() { } /* Initialize state of check boxes and texts */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::Init() { SetFocus(); m_AliasLocation = -1; #include "dialog_edit_component_in_lib.h" LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) { SetTitle( _( "Library Component Properties" ) ); return; } wxString title = _( "Properties for " ); bool isRoot = m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0; void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event ) if( !isRoot ) { title += m_Parent->GetAliasName() + _( " (alias of " ) + component->GetName() + wxT( ")" ); } else { bool partLocked = GetComponent()->UnitsLocked(); title += component->GetName(); } DIALOG_EDIT_COMPONENT_IN_LIBRARY dlg( this ); SetTitle( title ); InitPanelDoc(); InitBasicPanel(); if( dlg.ShowModal() == wxID_CANCEL ) if( isRoot && component->GetAliasCount() == 1 ) m_ButtonDeleteAllAlias->Enable( false ); /* Place list of alias names in listbox */ m_PartAliasListCtrl->Append( component->GetAliasNames( false ) ); if( component->GetAliasCount() <= 1 ) { m_ButtonDeleteAllAlias->Enable( false ); m_ButtonDeleteOneAlias->Enable( false ); } /* Read the Footprint Filter list */ m_FootprintFilterListBox->Append( component->GetFootPrints() ); if( component->GetFootPrints().GetCount() == 0 ) { m_ButtonDeleteAllFootprintFilter->Enable( false ); m_ButtonDeleteOneFootprintFilter->Enable( false ); } m_sdbSizer2OK->SetDefault(); } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnCancelClick( wxCommandEvent& event ) { EndModal( wxID_CANCEL ); } void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitPanelDoc() { LIB_ALIAS* alias; LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL ) return; wxString aliasname = m_Parent->GetAliasName(); if( aliasname.IsEmpty() ) return; if( partLocked != GetComponent()->UnitsLocked() ) alias = component->GetAlias( aliasname ); if( alias != NULL ) { // g_EditPinByPinIsOn is set to the better value, if m_UnitSelectionLocked has changed g_EditPinByPinIsOn = GetComponent()->UnitsLocked() ? true : false; m_DocCtrl->SetValue( alias->GetDescription() ); m_KeywordsCtrl->SetValue( alias->GetKeyWords() ); m_DocfileCtrl->SetValue( alias->GetDocFileName() ); } } /* * create the basic panel for component properties editing */ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::InitBasicPanel() { LIB_COMPONENT* component = m_Parent->GetComponent(); if( m_Parent->GetShowDeMorgan() ) m_AsConvertButt->SetValue( true ); /* Default values for a new component. */ if( component == NULL ) { m_ShowPinNumButt->SetValue( true ); m_ShowPinNameButt->SetValue( true ); m_PinsNameInsideButt->SetValue( true ); m_SelNumberOfUnits->SetValue( 1 ); m_SetSkew->SetValue( 40 ); m_OptionPower->SetValue( false ); m_OptionPartsLocked->SetValue( false ); return; } UpdateAliasSelectList(); UpdatePartSelectList(); DisplayLibInfos(); DisplayCmpDoc(); OnModify(); DrawPanel->Refresh(); m_ShowPinNumButt->SetValue( component->ShowPinNumbers() ); m_ShowPinNameButt->SetValue( component->ShowPinNames() ); m_PinsNameInsideButt->SetValue( component->GetPinNameOffset() != 0 ); m_SelNumberOfUnits->SetValue( component->GetPartCount() ); m_SetSkew->SetValue( component->GetPinNameOffset() ); m_OptionPower->SetValue( component->IsPower() ); m_OptionPartsLocked->SetValue( component->UnitsLocked() && component->GetPartCount() > 1 ); } Loading Loading @@ -124,6 +227,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnOkClick( wxCommandEvent& event ) /* Set the option "Units locked". * Obviously, cannot be true if there is only one part */ component->LockUnits( m_OptionPartsLocked->GetValue() ); if( component->GetPartCount() <= 1 ) component->LockUnits( false ); Loading Loading @@ -190,6 +294,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED return; wxTextEntryDialog dlg( this, _( "New alias:" ), _( "Component Alias" ), aliasname ); if( dlg.ShowModal() != wxID_OK ) return; // cancelled by user Loading @@ -211,8 +316,10 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart( wxCommandEvent& WXUNUSED } m_PartAliasListCtrl->Append( aliasname ); if( m_Parent->GetAliasName().CmpNoCase( component->GetName() ) == 0 ) m_ButtonDeleteAllAlias->Enable( true ); m_ButtonDeleteOneAlias->Enable( true ); } Loading @@ -223,6 +330,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAliasOfPart( wxCommandEvent& WXUNUS if( aliasname.IsEmpty() ) return; if( aliasname.CmpNoCase( m_Parent->GetAliasName() ) == 0 ) { wxString msg; Loading @@ -234,6 +342,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAliasOfPart( wxCommandEvent& WXUNUS m_PartAliasListCtrl->Delete( m_PartAliasListCtrl->GetSelection() ); LIB_COMPONENT* component = m_Parent->GetComponent(); if( component ) component->RemoveAlias( aliasname ); Loading Loading @@ -271,8 +380,7 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::SetUnsetConvert() { LIB_COMPONENT* component = m_Parent->GetComponent(); if( component == NULL || ( m_Parent->GetShowDeMorgan() == component->HasConversion() ) ) if( component == NULL || ( m_Parent->GetShowDeMorgan() == component->HasConversion() ) ) return false; if( m_Parent->GetShowDeMorgan() ) Loading
eeschema/dialog_edit_component_in_lib.h→eeschema/dialogs/dialog_edit_component_in_lib.h +0 −0 File moved. View file
eeschema/dialog_edit_component_in_lib_base.cpp→eeschema/dialogs/dialog_edit_component_in_lib_base.cpp +0 −0 File moved. View file