Don't restrict page sizes unnecessarily.
Also don't validate custom sizes unless they are enabled. Fixes https://gitlab.com/kicad/code/kicad/issues/8880
This commit is contained in:
parent
138a965c2a
commit
f024bf2289
|
@ -202,11 +202,17 @@ bool DIALOG_PAGES_SETTINGS::TransferDataToWindow()
|
||||||
|
|
||||||
bool DIALOG_PAGES_SETTINGS::TransferDataFromWindow()
|
bool DIALOG_PAGES_SETTINGS::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
if( !m_customSizeX.Validate( MIN_PAGE_SIZE_MILS, m_maxPageSizeMils.x, EDA_UNITS::MILS ) )
|
int idx = std::max( m_paperSizeComboBox->GetSelection(), 0 );
|
||||||
return false;
|
const wxString paperType = m_pageFmt[idx];
|
||||||
|
|
||||||
if( !m_customSizeY.Validate( MIN_PAGE_SIZE_MILS, m_maxPageSizeMils.y, EDA_UNITS::MILS ) )
|
if( paperType.Contains( PAGE_INFO::Custom ) )
|
||||||
return false;
|
{
|
||||||
|
if( !m_customSizeX.Validate( MIN_PAGE_SIZE_MILS, m_maxPageSizeMils.x, EDA_UNITS::MILS ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if( !m_customSizeY.Validate( MIN_PAGE_SIZE_MILS, m_maxPageSizeMils.y, EDA_UNITS::MILS ) )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( SavePageSettings() )
|
if( SavePageSettings() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include <base_units.h> // for IU_PER_MILS
|
#include <base_units.h> // for IU_PER_MILS
|
||||||
|
|
||||||
/// Min and max page sizes for clamping, in mils.
|
/// Min and max page sizes for clamping, in mils.
|
||||||
#define MIN_PAGE_SIZE_MILS 4000
|
#define MIN_PAGE_SIZE_MILS 100
|
||||||
#define MAX_PAGE_SIZE_PCBNEW_MILS 48000
|
#define MAX_PAGE_SIZE_PCBNEW_MILS 48000
|
||||||
#define MAX_PAGE_SIZE_MILS 120000
|
#define MAX_PAGE_SIZE_MILS 120000
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue