diff --git a/eeschema/dialogs/dialog_lib_new_symbol_base.cpp b/eeschema/dialogs/dialog_lib_new_symbol_base.cpp index d25cfef4d8..7e9101e747 100644 --- a/eeschema/dialogs/dialog_lib_new_symbol_base.cpp +++ b/eeschema/dialogs/dialog_lib_new_symbol_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -73,7 +73,7 @@ DIALOG_LIB_NEW_SYMBOL_BASE::DIALOG_LIB_NEW_SYMBOL_BASE( wxWindow* parent, wxWind bSizer17->Add( m_checkLockItems, 0, wxRIGHT|wxLEFT, 5 ); - m_checkHasConversion = new wxCheckBox( this, wxID_ANY, _("Create symbol with alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkHasConversion = new wxCheckBox( this, wxID_ANY, _("Create symbol with alternate body style (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer17->Add( m_checkHasConversion, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_checkIsPowerSymbol = new wxCheckBox( this, wxID_ANY, _("Create symbol as power symbol"), wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/eeschema/dialogs/dialog_lib_new_symbol_base.fbp b/eeschema/dialogs/dialog_lib_new_symbol_base.fbp index 0ec3ee077b..e3122420c4 100644 --- a/eeschema/dialogs/dialog_lib_new_symbol_base.fbp +++ b/eeschema/dialogs/dialog_lib_new_symbol_base.fbp @@ -14,7 +14,6 @@ dialog_lib_new_symbol_base 1000 none - 1 dialog_lib_new_symbol_base @@ -26,7 +25,6 @@ 1 1 UI - 0 1 0 @@ -693,7 +691,7 @@ 0 0 wxID_ANY - Create symbol with alternate body style (DeMorgan) + Create symbol with alternate body style (De Morgan) 0 diff --git a/eeschema/dialogs/dialog_lib_new_symbol_base.h b/eeschema/dialogs/dialog_lib_new_symbol_base.h index 3bff5b974f..6bb1e1600a 100644 --- a/eeschema/dialogs/dialog_lib_new_symbol_base.h +++ b/eeschema/dialogs/dialog_lib_new_symbol_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_lib_shape_properties_base.cpp b/eeschema/dialogs/dialog_lib_shape_properties_base.cpp index 89851a3325..bbd6b66def 100644 --- a/eeschema/dialogs/dialog_lib_shape_properties_base.cpp +++ b/eeschema/dialogs/dialog_lib_shape_properties_base.cpp @@ -45,7 +45,7 @@ DIALOG_LIB_SHAPE_PROPERTIES_BASE::DIALOG_LIB_SHAPE_PROPERTIES_BASE( wxWindow* pa m_checkApplyToAllUnits = new wxCheckBox( this, wxID_ANY, _("Common to all &units in symbol"), wxDefaultPosition, wxDefaultSize, 0 ); dlgBorderSizer->Add( m_checkApplyToAllUnits, 0, wxALL, 3 ); - m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Common to all body &styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Common to all body &styles (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 ); dlgBorderSizer->Add( m_checkApplyToAllConversions, 0, wxALL, 3 ); diff --git a/eeschema/dialogs/dialog_lib_shape_properties_base.fbp b/eeschema/dialogs/dialog_lib_shape_properties_base.fbp index b6fb366b1e..1ee010cfc9 100644 --- a/eeschema/dialogs/dialog_lib_shape_properties_base.fbp +++ b/eeschema/dialogs/dialog_lib_shape_properties_base.fbp @@ -427,7 +427,7 @@ 0 0 wxID_ANY - Common to all body &styles (DeMorgan) + Common to all body &styles (De Morgan) 0 diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index 5fffc4686f..61eddd4a5b 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -272,20 +272,19 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::Validate() } } + /* + * Confirm destructive actions. + */ + if( m_SelNumberOfUnits->GetValue() < m_libEntry->GetUnitCount() ) { if( !IsOK( this, _( "Delete extra units from symbol?" ) ) ) return false; } - if( m_AsConvertButt->GetValue() && !m_libEntry->HasConversion() ) + if( !m_AsConvertButt->GetValue() && m_libEntry->HasConversion() ) { - if( !IsOK( this, _( "Add new pins for alternate body style (DeMorgan) to symbol?" ) ) ) - return false; - } - else if( !m_AsConvertButt->GetValue() && m_libEntry->HasConversion() ) - { - if( !IsOK( this, _( "Delete alternate body style (DeMorgan) draw items from symbol?" ) ) ) + if( !IsOK( this, _( "Delete alternate body style (De Morgan) from symbol?" ) ) ) return false; } diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp index c91faecfbd..fc8ad78b5a 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.cpp @@ -165,7 +165,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES_BASE::DIALOG_LIB_SYMBOL_PROPERTIES_BASE( wxWindow* wxStaticBoxSizer* sbSizerSymbol; sbSizerSymbol = new wxStaticBoxSizer( new wxStaticBox( m_PanelBasic, wxID_ANY, _("Symbol") ), wxVERTICAL ); - m_AsConvertButt = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Has alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_AsConvertButt = new wxCheckBox( sbSizerSymbol->GetStaticBox(), wxID_ANY, _("Has alternate body style (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 ); m_AsConvertButt->SetToolTip( _("Check this option if the symbol has an alternate body style (De Morgan)") ); sbSizerSymbol->Add( m_AsConvertButt, 0, wxRIGHT|wxLEFT, 5 ); diff --git a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp index beca426cd7..c5f6b7e840 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_lib_symbol_properties_base.fbp @@ -1200,7 +1200,7 @@ 0 0 wxID_ANY - Has alternate body style (DeMorgan) + Has alternate body style (De Morgan) 0 diff --git a/eeschema/dialogs/dialog_pin_properties.cpp b/eeschema/dialogs/dialog_pin_properties.cpp index 03388e1ada..2cab71856e 100644 --- a/eeschema/dialogs/dialog_pin_properties.cpp +++ b/eeschema/dialogs/dialog_pin_properties.cpp @@ -203,7 +203,7 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN m_alternatesTurndown->Collapse(); m_alternatesTurndown->Disable(); m_alternatesTurndown->SetToolTip( - _( "Alternate pin assignments are not available for DeMorgan symbols." ) ); + _( "Alternate pin assignments are not available for De Morgan symbols." ) ); } // Set special attributes @@ -221,6 +221,7 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, LIB_PIN m_addAlternate->SetBitmap( KiBitmap( BITMAPS::small_plus ) ); m_deleteAlternate->SetBitmap( KiBitmap( BITMAPS::small_trash ) ); + m_addAlternate->GetParent()->Layout(); m_sdbSizerButtonsOK->SetDefault(); SetInitialFocus( m_textPinName ); diff --git a/eeschema/dialogs/dialog_pin_properties_base.cpp b/eeschema/dialogs/dialog_pin_properties_base.cpp index bc4eb5ba64..35cb222989 100644 --- a/eeschema/dialogs/dialog_pin_properties_base.cpp +++ b/eeschema/dialogs/dialog_pin_properties_base.cpp @@ -167,7 +167,7 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind m_checkApplyToAllParts = new wxCheckBox( this, wxID_ANY, _("Common to all &units in symbol"), wxDefaultPosition, wxDefaultSize, 0 ); checkboxesSizer->Add( m_checkApplyToAllParts, 0, wxBOTTOM, 3 ); - m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Common to all body &styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Common to all body &styles (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 ); checkboxesSizer->Add( m_checkApplyToAllConversions, 0, wxBOTTOM, 3 ); @@ -204,6 +204,9 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind wxBoxSizer* bAlternatesSizer; bAlternatesSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bRightMargin; + bRightMargin = new wxBoxSizer( wxVERTICAL ); + m_alternatesGrid = new WX_GRID( m_alternatesTurndown->GetPane(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); // Grid @@ -236,13 +239,16 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind m_alternatesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); m_alternatesGrid->SetMinSize( wxSize( -1,100 ) ); - bAlternatesSizer->Add( m_alternatesGrid, 1, wxEXPAND|wxRIGHT, 5 ); + bRightMargin->Add( m_alternatesGrid, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bAlternatesSizer->Add( bRightMargin, 1, wxEXPAND|wxRIGHT, 5 ); wxBoxSizer* bButtonSizer; bButtonSizer = new wxBoxSizer( wxHORIZONTAL ); m_addAlternate = new wxBitmapButton( m_alternatesTurndown->GetPane(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bButtonSizer->Add( m_addAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + bButtonSizer->Add( m_addAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bButtonSizer->Add( 20, 0, 0, wxALIGN_CENTER_VERTICAL, 5 ); @@ -251,19 +257,19 @@ DIALOG_PIN_PROPERTIES_BASE::DIALOG_PIN_PROPERTIES_BASE( wxWindow* parent, wxWind bButtonSizer->Add( m_deleteAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - bAlternatesSizer->Add( bButtonSizer, 0, wxEXPAND|wxTOP, 5 ); + bAlternatesSizer->Add( bButtonSizer, 0, wxTOP, 5 ); m_alternatesTurndown->GetPane()->SetSizer( bAlternatesSizer ); m_alternatesTurndown->GetPane()->Layout(); bAlternatesSizer->Fit( m_alternatesTurndown->GetPane() ); - bLowerSizer->Add( m_alternatesTurndown, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + bLowerSizer->Add( m_alternatesTurndown, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); mainSizer->Add( bLowerSizer, 1, wxEXPAND|wxLEFT, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - mainSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); + mainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_sdbSizerButtons = new wxStdDialogButtonSizer(); m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); diff --git a/eeschema/dialogs/dialog_pin_properties_base.fbp b/eeschema/dialogs/dialog_pin_properties_base.fbp index 1d51f8bf6a..9e1fa58a3e 100644 --- a/eeschema/dialogs/dialog_pin_properties_base.fbp +++ b/eeschema/dialogs/dialog_pin_properties_base.fbp @@ -2059,7 +2059,7 @@ 0 0 wxID_ANY - Common to all body &styles (DeMorgan) + Common to all body &styles (De Morgan) 0 @@ -2301,7 +2301,7 @@ wxVERTICAL none - 10 + 5 wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 @@ -2371,93 +2371,104 @@ 5 wxEXPAND|wxRIGHT 1 - - 1 - 1 - 1 - 1 - - - - - 0 - 0 - - - - 1 - - - wxALIGN_LEFT - - wxALIGN_TOP - 0 - 1 - wxALIGN_CENTER - 22 - "Alternate Pin Name" "Electrical Type" "Graphic Style" - wxALIGN_CENTER - 3 - 260,140,140 - - 1 - 0 - Dock - 0 - Left - 0 - 0 - 0 - 0 - 1 - 1 - - 1 - - - 1 - 0 - 0 - wxID_ANY - - - - 0 - 0 - - 0 - - - 0 - -1,100 - 1 - m_alternatesGrid - 1 - - - protected - 1 - - Resizable - wxALIGN_CENTER - 0 - - wxALIGN_CENTER - - 1 - 1 - - WX_GRID; widgets/wx_grid.h; forward_declare - 0 - - - - + + + bRightMargin + wxVERTICAL + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + + wxALIGN_LEFT + + wxALIGN_TOP + 0 + 1 + wxALIGN_CENTER + 22 + "Alternate Pin Name" "Electrical Type" "Graphic Style" + wxALIGN_CENTER + 3 + 260,140,140 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 1 + 1 + + 1 + + + 1 + 0 + 0 + wxID_ANY + + + + 0 + 0 + + 0 + + + 0 + -1,100 + 1 + m_alternatesGrid + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTER + 0 + + wxALIGN_CENTER + + 1 + 1 + + WX_GRID; widgets/wx_grid.h; forward_declare + 0 + + + + + + 5 - wxEXPAND|wxTOP + wxTOP 0 @@ -2466,7 +2477,7 @@ none 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -2629,7 +2640,7 @@ 5 - wxEXPAND|wxLEFT|wxRIGHT + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 diff --git a/eeschema/dialogs/dialog_symbol_properties.cpp b/eeschema/dialogs/dialog_symbol_properties.cpp index f2f2d34d25..bb4dae8f16 100644 --- a/eeschema/dialogs/dialog_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_symbol_properties.cpp @@ -331,7 +331,7 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent, // free-form alternate assignments as well. (We won't know how to map the alternates // back and forth when the conversion is changed.) m_pinTablePage->Disable(); - m_pinTablePage->SetToolTip( _( "Alternate pin assignments are not available for DeMorgan " + m_pinTablePage->SetToolTip( _( "Alternate pin assignments are not available for De Morgan " "symbols." ) ); } else diff --git a/eeschema/dialogs/dialog_symbol_properties_base.cpp b/eeschema/dialogs/dialog_symbol_properties_base.cpp index 177579963a..f912d39749 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.cpp +++ b/eeschema/dialogs/dialog_symbol_properties_base.cpp @@ -134,7 +134,7 @@ DIALOG_SYMBOL_PROPERTIES_BASE::DIALOG_SYMBOL_PROPERTIES_BASE( wxWindow* parent, gbSizer1->Add( m_unitChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxLEFT|wxRIGHT, 5 ); - m_cbAlternateSymbol = new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Alternate symbol (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbAlternateSymbol = new wxCheckBox( sbGeneralProps->GetStaticBox(), wxID_ANY, _("Alternate symbol (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 ); m_cbAlternateSymbol->SetToolTip( _("Use the alternate shape of this symbol.\nFor gates, this is the \"De Morgan\" conversion") ); gbSizer1->Add( m_cbAlternateSymbol, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); diff --git a/eeschema/dialogs/dialog_symbol_properties_base.fbp b/eeschema/dialogs/dialog_symbol_properties_base.fbp index 13272ebd45..44689751f8 100644 --- a/eeschema/dialogs/dialog_symbol_properties_base.fbp +++ b/eeschema/dialogs/dialog_symbol_properties_base.fbp @@ -808,7 +808,7 @@ 0 0 wxID_ANY - Alternate symbol (DeMorgan) + Alternate symbol (De Morgan) 0 diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index b5e4ec85b4..3f35792234 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -450,17 +450,17 @@ TOOL_ACTION EE_ACTIONS::assignNetclass( "eeschema.InteractiveEdit.assignNetclass TOOL_ACTION EE_ACTIONS::toggleDeMorgan( "eeschema.InteractiveEdit.toggleDeMorgan", AS_GLOBAL, 0, "", - _( "DeMorgan Conversion" ), _( "Switch between DeMorgan representations" ), + _( "De Morgan Conversion" ), _( "Switch between De Morgan representations" ), BITMAPS::morgan2 ); TOOL_ACTION EE_ACTIONS::showDeMorganStandard( "eeschema.InteractiveEdit.showDeMorganStandard", AS_GLOBAL, 0, "", - _( "DeMorgan Standard" ), _( "Switch to standard DeMorgan representation" ), + _( "De Morgan Standard" ), _( "Switch to standard De Morgan representation" ), BITMAPS::morgan1 ); TOOL_ACTION EE_ACTIONS::showDeMorganAlternate( "eeschema.InteractiveEdit.showDeMorganAlternate", AS_GLOBAL, 0, "", - _( "DeMorgan Alternate" ), _( "Switch to alternate DeMorgan representation" ), + _( "De Morgan Alternate" ), _( "Switch to alternate De Morgan representation" ), BITMAPS::morgan2 ); TOOL_ACTION EE_ACTIONS::toLabel( "eeschema.InteractiveEdit.toLabel",