Don't set dirty flag unnecessarily.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23292
This commit is contained in:
+70
-49
@@ -222,23 +222,26 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
|
||||
if( m_plotOnAllLayersSequence != aPcbPlotParams.m_plotOnAllLayersSequence )
|
||||
return false;
|
||||
|
||||
if( m_useGerberProtelExtensions != aPcbPlotParams.m_useGerberProtelExtensions )
|
||||
return false;
|
||||
if( m_format == PLOT_FORMAT::GERBER )
|
||||
{
|
||||
if( m_useGerberProtelExtensions != aPcbPlotParams.m_useGerberProtelExtensions )
|
||||
return false;
|
||||
|
||||
if( m_gerberDisableApertMacros != aPcbPlotParams.m_gerberDisableApertMacros )
|
||||
return false;
|
||||
if( m_gerberDisableApertMacros != aPcbPlotParams.m_gerberDisableApertMacros )
|
||||
return false;
|
||||
|
||||
if( m_useGerberX2format != aPcbPlotParams.m_useGerberX2format )
|
||||
return false;
|
||||
if( m_useGerberX2format != aPcbPlotParams.m_useGerberX2format )
|
||||
return false;
|
||||
|
||||
if( m_includeGerberNetlistInfo != aPcbPlotParams.m_includeGerberNetlistInfo )
|
||||
return false;
|
||||
if( m_includeGerberNetlistInfo != aPcbPlotParams.m_includeGerberNetlistInfo )
|
||||
return false;
|
||||
|
||||
if( m_createGerberJobFile != aPcbPlotParams.m_createGerberJobFile )
|
||||
return false;
|
||||
if( m_createGerberJobFile != aPcbPlotParams.m_createGerberJobFile )
|
||||
return false;
|
||||
|
||||
if( m_gerberPrecision != aPcbPlotParams.m_gerberPrecision )
|
||||
return false;
|
||||
if( m_gerberPrecision != aPcbPlotParams.m_gerberPrecision )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_dashedLineDashRatio != aPcbPlotParams.m_dashedLineDashRatio )
|
||||
return false;
|
||||
@@ -249,35 +252,50 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
|
||||
if( m_plotDrawingSheet != aPcbPlotParams.m_plotDrawingSheet )
|
||||
return false;
|
||||
|
||||
if( m_DXFPlotMode != aPcbPlotParams.m_DXFPlotMode )
|
||||
return false;
|
||||
if( m_format == PLOT_FORMAT::DXF )
|
||||
{
|
||||
if( m_DXFPlotMode != aPcbPlotParams.m_DXFPlotMode )
|
||||
return false;
|
||||
|
||||
if( m_DXFPolygonMode != aPcbPlotParams.m_DXFPolygonMode )
|
||||
return false;
|
||||
if( m_DXFPolygonMode != aPcbPlotParams.m_DXFPolygonMode )
|
||||
return false;
|
||||
|
||||
if( m_DXFUnits != aPcbPlotParams.m_DXFUnits )
|
||||
return false;
|
||||
if( m_DXFUnits != aPcbPlotParams.m_DXFUnits )
|
||||
return false;
|
||||
|
||||
if( m_DXFExportAsMultiLayeredFile != aPcbPlotParams.m_DXFExportAsMultiLayeredFile )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_svgPrecision != aPcbPlotParams.m_svgPrecision )
|
||||
return false;
|
||||
|
||||
if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
|
||||
return false;
|
||||
if( m_format != PLOT_FORMAT::POST )
|
||||
{
|
||||
if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_negative != aPcbPlotParams.m_negative )
|
||||
return false;
|
||||
if( m_format == PLOT_FORMAT::POST || m_format == PLOT_FORMAT::SVG || m_format == PLOT_FORMAT::PDF )
|
||||
{
|
||||
if( m_negative != aPcbPlotParams.m_negative )
|
||||
return false;
|
||||
|
||||
if( m_PDFFrontFPPropertyPopups != aPcbPlotParams.m_PDFFrontFPPropertyPopups )
|
||||
return false;
|
||||
if( m_mirror != aPcbPlotParams.m_mirror )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_PDFBackFPPropertyPopups != aPcbPlotParams.m_PDFBackFPPropertyPopups )
|
||||
return false;
|
||||
if( m_format == PLOT_FORMAT::PDF )
|
||||
{
|
||||
if( m_PDFFrontFPPropertyPopups != aPcbPlotParams.m_PDFFrontFPPropertyPopups )
|
||||
return false;
|
||||
|
||||
if( m_PDFMetadata != aPcbPlotParams.m_PDFMetadata )
|
||||
return false;
|
||||
if( m_PDFBackFPPropertyPopups != aPcbPlotParams.m_PDFBackFPPropertyPopups )
|
||||
return false;
|
||||
|
||||
if( m_A4Output != aPcbPlotParams.m_A4Output )
|
||||
return false;
|
||||
if( m_PDFMetadata != aPcbPlotParams.m_PDFMetadata )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_plotReference != aPcbPlotParams.m_plotReference )
|
||||
return false;
|
||||
@@ -309,29 +327,35 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
|
||||
if( m_format != aPcbPlotParams.m_format )
|
||||
return false;
|
||||
|
||||
if( m_mirror != aPcbPlotParams.m_mirror )
|
||||
return false;
|
||||
if( m_format != PLOT_FORMAT::GERBER )
|
||||
{
|
||||
if( m_drillMarks != aPcbPlotParams.m_drillMarks )
|
||||
return false;
|
||||
|
||||
if( m_drillMarks != aPcbPlotParams.m_drillMarks )
|
||||
return false;
|
||||
if( m_scaleSelection != aPcbPlotParams.m_scaleSelection )
|
||||
return false;
|
||||
|
||||
if( m_scaleSelection != aPcbPlotParams.m_scaleSelection )
|
||||
return false;
|
||||
if( m_autoScale != aPcbPlotParams.m_autoScale )
|
||||
return false;
|
||||
|
||||
if( m_autoScale != aPcbPlotParams.m_autoScale )
|
||||
return false;
|
||||
if( m_scale != aPcbPlotParams.m_scale )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_scale != aPcbPlotParams.m_scale )
|
||||
return false;
|
||||
if( m_format == PLOT_FORMAT::POST )
|
||||
{
|
||||
if( m_A4Output != aPcbPlotParams.m_A4Output )
|
||||
return false;
|
||||
|
||||
if( m_fineScaleAdjustX != aPcbPlotParams.m_fineScaleAdjustX )
|
||||
return false;
|
||||
if( m_fineScaleAdjustX != aPcbPlotParams.m_fineScaleAdjustX )
|
||||
return false;
|
||||
|
||||
if( m_fineScaleAdjustY != aPcbPlotParams.m_fineScaleAdjustY )
|
||||
return false;
|
||||
if( m_fineScaleAdjustY != aPcbPlotParams.m_fineScaleAdjustY )
|
||||
return false;
|
||||
|
||||
if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
|
||||
return false;
|
||||
if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_textMode != aPcbPlotParams.m_textMode )
|
||||
return false;
|
||||
@@ -342,9 +366,6 @@ bool PCB_PLOT_PARAMS::IsSameAs( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
|
||||
if( !m_outputDirectory.IsSameAs( aPcbPlotParams.m_outputDirectory ) )
|
||||
return false;
|
||||
|
||||
if( m_DXFExportAsMultiLayeredFile != aPcbPlotParams.m_DXFExportAsMultiLayeredFile )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user