diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 7de8349443..c649b05dac 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -202,11 +202,17 @@ bool DIALOG_PAGES_SETTINGS::TransferDataToWindow() bool DIALOG_PAGES_SETTINGS::TransferDataFromWindow() { - if( !m_customSizeX.Validate( MIN_PAGE_SIZE_MILS, m_maxPageSizeMils.x, EDA_UNITS::MILS ) ) - return false; + int idx = std::max( m_paperSizeComboBox->GetSelection(), 0 ); + const wxString paperType = m_pageFmt[idx]; + + if( paperType.Contains( PAGE_INFO::Custom ) ) + { + 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( !m_customSizeY.Validate( MIN_PAGE_SIZE_MILS, m_maxPageSizeMils.y, EDA_UNITS::MILS ) ) + return false; + } if( SavePageSettings() ) { diff --git a/include/page_info.h b/include/page_info.h index 8b8c5c959c..4de3b85302 100644 --- a/include/page_info.h +++ b/include/page_info.h @@ -36,7 +36,7 @@ #include // for IU_PER_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_MILS 120000