pcbnew: Force resize event when changing pad type

The local settings panel needs to have its children sized when shown.
Triggering a resize event on changing the pad shape accomplishes this.
This is not triggered in master due to refactor of the custom pad
connection options.

Fixes: lp:1837789
* https://bugs.launchpad.net/kicad/+bug/1837789
This commit is contained in:
Seth Hillbrand 2019-08-27 05:52:21 -07:00
parent 80e0d848f2
commit fe71a66bb9
4 changed files with 587 additions and 4662 deletions

View File

@ -940,20 +940,13 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
m_staticTextCornerSizeRatioUnit->Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT );
m_cornerRadius.Enable( m_PadShape->GetSelection() == CHOICE_SHAPE_ROUNDRECT );
// PAD_SHAPE_CUSTOM type has constraints for zone connection and thermal shape:
// only not connected or solid connection is allowed to avoid destroying the shape.
// Enable/disable options only available for custom shaped pads
m_ZoneConnectionChoice->Enable( !is_custom );
m_ZoneConnectionCustom->Enable( is_custom );
m_spokeWidth.Enable( !is_custom );
m_thermalGap.Enable( !is_custom );
m_sbSizerZonesSettings->Show( !is_custom );
m_sbSizerCustomShapedZonesSettings->Show( is_custom );
transferDataToPad( m_dummyPad );
updateRoundRectCornerValues();
m_localSettingsPanel->SetSize( m_localSettingsPanel->GetEffectiveMinSize() );
redraw();
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -583,7 +583,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
m_sbSizerCustomShapedZonesSettings->Add( fgSizerCustomShapedCopperZonesOpts, 0, wxEXPAND, 5 );
bSizerClearance->Add( m_sbSizerCustomShapedZonesSettings, 1, wxEXPAND|wxALL, 5 );
bSizerClearance->Add( m_sbSizerCustomShapedZonesSettings, 0, wxEXPAND|wxALL, 5 );
bSizerPanelClearance->Add( bSizerClearance, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@ -1098,13 +1098,13 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi
m_gridCornersList->SetColLabelSize( 22 );
m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Rows
m_gridCornersList->AutoSizeRows();
m_gridCornersList->EnableDragRowSize( false );
m_gridCornersList->SetRowLabelSize( 80 );
m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_gridCornersList->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
// Label Appearance
@ -1115,7 +1115,7 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi
wxBoxSizer* bSizerRightButts;
bSizerRightButts = new wxBoxSizer( wxHORIZONTAL );
m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_addButton->SetMinSize( wxSize( 30,30 ) );
bSizerRightButts->Add( m_addButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
@ -1123,7 +1123,7 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi
bSizerRightButts->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_deleteButton->SetMinSize( wxSize( 30,30 ) );
bSizerRightButts->Add( m_deleteButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,19 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// C++ code generated with wxFormBuilder (version Apr 23 2019)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PAD_PROPERTIES_BASE_H__
#define __DIALOG_PAD_PROPERTIES_BASE_H__
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
class TEXT_CTRL_EVAL;
class WX_GRID;
class wxListView;
#include "dialog_shim.h"
#include <wx/string.h>
@ -332,4 +333,3 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
};
#endif //__DIALOG_PAD_PROPERTIES_BASE_H__