Pcbnew: add the board thickness setup in dialog_layers_setup.cpp (mainly for the 3D viewer)
This commit is contained in:
@@ -322,6 +322,9 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa
|
||||
m_copperLayerCount = m_pcb->GetCopperLayerCount();
|
||||
showCopperChoice( m_copperLayerCount );
|
||||
setCopperLayerCheckBoxes( m_copperLayerCount );
|
||||
m_staticTextBrdThicknessUnit->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||
PutValueInLocalUnits( *m_textCtrlBrdThickness,
|
||||
m_pcb->GetDesignSettings().GetBoardThickness() );
|
||||
|
||||
showBoardLayerNames();
|
||||
|
||||
@@ -620,6 +623,13 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
|
||||
}
|
||||
}
|
||||
|
||||
int thickness = ValueFromTextCtrl( *m_textCtrlBrdThickness );
|
||||
|
||||
// Clamp the value between reasonable values
|
||||
|
||||
thickness = Clamp( Millimeter2iu( 0.1 ), thickness, Millimeter2iu( 3.0 ) );
|
||||
m_pcb->GetDesignSettings().SetBoardThickness( thickness );
|
||||
|
||||
EndModal( wxID_OK );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user