Take user to Stackup Page when layers don't match.

Fixes https://gitlab.com/kicad/code/kicad/issues/3807
This commit is contained in:
Jeff Young 2020-08-05 00:40:59 +01:00
parent 5d6c65509a
commit 9fda8d58d0
2 changed files with 9 additions and 4 deletions

View File

@ -70,6 +70,7 @@ PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP( PAGED_DIALOG* aParent, PCB
m_solderMaskMatList( DIELECTRIC_SUBSTRATE_LIST::DL_MATERIAL_SOLDERMASK ),
m_silkscreenMatList( DIELECTRIC_SUBSTRATE_LIST::DL_MATERIAL_SILKSCREEN )
{
m_parentDialog = aParent;
m_frame = aFrame;
m_panelLayers = aPanelLayers;
m_board = m_frame->GetBoard();
@ -878,7 +879,8 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
if( m_enabledLayers != layersList )
{
wxMessageBox( _( "Stackup not up to date. Verify it" ) );
m_parentDialog->SetError( _( "Stackup layers don't match board layers" ), this,
m_thicknessCtrl );
return false;
}

View File

@ -211,10 +211,11 @@ private:
*/
void disconnectEvents();
BOARD_STACKUP m_stackup;
private:
BOARD_STACKUP m_stackup;
PANEL_SETUP_LAYERS* m_panelLayers; // The associated PANEL_SETUP_LAYERS, to know
// enabled layers and copper layer names
LSET m_enabledLayers; // the current enabled layers in this panel
LSET m_enabledLayers; // the current enabled layers in this panel
// restricted to allowed layers in stackup.
// when do not match the enabled layers
// in PANEL_SETUP_LAYERS the stackup is not up to date
@ -226,9 +227,11 @@ private:
DIELECTRIC_SUBSTRATE_LIST m_silkscreenMatList;
// List of items in m_fgGridSizer
std::vector<BOARD_STACKUP_ROW_UI_ITEM> m_rowUiItemsList;
PAGED_DIALOG* m_parentDialog;
BOARD* m_board;
BOARD_DESIGN_SETTINGS* m_brdSettings;
EDA_UNITS m_units;
EDA_UNITS m_units;
PCB_EDIT_FRAME* m_frame;
wxSize m_numericTextCtrlSize; // Best size to enter values with units in wxTextCtrl
wxSize m_numericFieldsSize; // Best size to enter double values in wxTextCtrl