From 3425deff47e88388aa94fb20904e3c1205d121a4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 30 May 2020 23:49:12 +0100 Subject: [PATCH] Hook up Edit Text and Graphics Properties to wires. Fixes https://gitlab.com/kicad/code/kicad/issues/1974 --- .../dialog_global_edit_text_and_graphics.cpp | 19 ++++++++----------- ...log_global_edit_text_and_graphics_base.cpp | 14 +++++++------- ...log_global_edit_text_and_graphics_base.fbp | 14 +++++++------- 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp b/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp index ced737ae97..5ec6ec5b83 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -273,19 +273,16 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( const SCH_SHEET_PATH& aS m_hasChange = true; } - if( lineItem->GetLayer() == LAYER_NOTES ) + if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION ) { - if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION ) - { - lineItem->SetLineStyle( m_lineStyle->GetSelection() ); - m_hasChange = true; - } + lineItem->SetLineStyle( m_lineStyle->GetSelection() ); + m_hasChange = true; + } - if( m_setColor->GetValue() ) - { - lineItem->SetLineColor( m_colorSwatch->GetSwatchColor() ); - m_hasChange = true; - } + if( m_setColor->GetValue() ) + { + lineItem->SetLineColor( m_colorSwatch->GetSwatchColor() ); + m_hasChange = true; } } } diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp index 241bda8697..d95ebe2de7 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp @@ -191,7 +191,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); - fgSizer1->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 ); + fgSizer1->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 25 ); m_Italic = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Italic"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER ); fgSizer1->Add( m_Italic, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); @@ -237,7 +237,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ fgSizer1->Add( m_Visible, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); + fgSizer1->Add( 80, 0, 1, wxEXPAND, 5 ); vAlignLabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("V Alignment (fields only):"), wxDefaultPosition, wxDefaultSize, 0 ); vAlignLabel->Wrap( -1 ); @@ -293,16 +293,16 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); - m_setColor = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Line color (sheets && graphics):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_setColor = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Line color:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer1->Add( m_setColor, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_colorSwatch = new COLOR_SWATCH( m_specifiedValues, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_colorSwatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_colorSwatch->SetMinSize( wxSize( 48,24 ) ); - fgSizer1->Add( m_colorSwatch, 0, wxRIGHT|wxLEFT, 5 ); + fgSizer1->Add( m_colorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - lineStyleLabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Line style (graphics only):"), wxDefaultPosition, wxDefaultSize, 0 ); + lineStyleLabel = new wxStaticText( m_specifiedValues, wxID_ANY, _("Line style:"), wxDefaultPosition, wxDefaultSize, 0 ); lineStyleLabel->Wrap( -1 ); fgSizer1->Add( lineStyleLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); @@ -318,14 +318,14 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); - m_setBgColor = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Background color (sheets only):"), wxDefaultPosition, wxDefaultSize, 0 ); + m_setBgColor = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Sheet background color:"), wxDefaultPosition, wxDefaultSize, 0 ); fgSizer1->Add( m_setBgColor, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_bgColorSwatch = new COLOR_SWATCH( m_specifiedValues, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_bgColorSwatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); m_bgColorSwatch->SetMinSize( wxSize( 48,24 ) ); - fgSizer1->Add( m_bgColorSwatch, 0, wxRIGHT|wxLEFT, 5 ); + fgSizer1->Add( m_bgColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); bSizer2->Add( fgSizer1, 1, wxEXPAND|wxTOP, 2 ); diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp index 7002d71c62..3b06123aed 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp @@ -2111,7 +2111,7 @@ - 20 + 25 wxEXPAND|wxRIGHT|wxLEFT 0 @@ -2470,7 +2470,7 @@ 0 protected - 0 + 80 @@ -3215,7 +3215,7 @@ 0 0 wxID_ANY - Line color (sheets && graphics): + Line color: 0 @@ -3248,7 +3248,7 @@ 5 - wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1 @@ -3340,7 +3340,7 @@ 0 0 wxID_ANY - Line style (graphics only): + Line style: 0 0 @@ -3486,7 +3486,7 @@ 0 0 wxID_ANY - Background color (sheets only): + Sheet background color: 0 @@ -3519,7 +3519,7 @@ 5 - wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT 0 1