Browse Source

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
6.0.7
Jeff Young 4 years ago
parent
commit
f024bf2289
  1. 14
      common/dialogs/dialog_page_settings.cpp
  2. 2
      include/page_info.h

14
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() )
{

2
include/page_info.h

@ -36,7 +36,7 @@
#include <base_units.h> // 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

Loading…
Cancel
Save