Save state of as-item-checkboxes checkbox.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13749
This commit is contained in:
Jeff Young 2023-11-05 16:22:20 +00:00
parent 1b6048b6d5
commit c5520b3eef
4 changed files with 10 additions and 7 deletions

View File

@ -2,8 +2,8 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010-2016 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2018 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2018-2023 CERN
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@ -26,9 +26,6 @@
*/
#include <kiface_base.h>
#include <confirm.h>
#include <core/arraydim.h>
#include <base_units.h>
#include <pcbnew_settings.h>
#include <pcbplot.h>
#include <board.h>
@ -38,7 +35,6 @@
#include <dialogs/dialog_print_generic.h>
#include <pcbnew_printout.h>
#include <wx/checklst.h>
#include <wx/textdlg.h>
class DIALOG_PRINT_PCBNEW : public DIALOG_PRINT_GENERIC
@ -160,6 +156,7 @@ bool DIALOG_PRINT_PCBNEW::TransferDataToWindow()
m_layerCheckListBox->Check( checkIndex );
}
m_checkAsItems->SetValue( settings()->m_AsItemCheckboxes );
m_checkboxMirror->SetValue( settings()->m_Mirror );
m_titleBlock->SetValue( settings()->m_titleBlock );

View File

@ -57,7 +57,8 @@ void PCBNEW_PRINTOUT_SETTINGS::Load( APP_SETTINGS_BASE* aConfig )
m_DrillMarks = static_cast<DRILL_MARKS>( cfg->m_Plot.pads_drill_mode );
m_Pagination = static_cast<PAGINATION_T>( cfg->m_Plot.all_layers_on_one_page );
m_PrintEdgeCutsOnAllPages = cfg->m_Plot.edgecut_on_all_layers;
m_Mirror = cfg->m_Plot.mirror;
m_Mirror = cfg->m_Plot.mirror;
m_AsItemCheckboxes = cfg->m_Plot.as_item_checkboxes;
}
}
@ -72,6 +73,7 @@ void PCBNEW_PRINTOUT_SETTINGS::Save( APP_SETTINGS_BASE* aConfig )
cfg->m_Plot.all_layers_on_one_page = m_Pagination;
cfg->m_Plot.edgecut_on_all_layers = m_PrintEdgeCutsOnAllPages;
cfg->m_Plot.mirror = m_Mirror;
cfg->m_Plot.as_item_checkboxes = m_AsItemCheckboxes;
}
}

View File

@ -512,6 +512,9 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
m_params.emplace_back( new PARAM<bool>( "plot.mirror",
&m_Plot.mirror, false ) );
m_params.emplace_back( new PARAM<bool>( "plot.as_item_checkboxes",
&m_Plot.as_item_checkboxes, false ) );
m_params.emplace_back( new PARAM<wxString>( "window.footprint_text_shown_columns",
&m_FootprintTextShownColumns, "0 1 2 3 4 5 6" ) );

View File

@ -276,6 +276,7 @@ public:
double ps_fine_width_adjust;
bool check_zones_before_plotting;
bool mirror;
bool as_item_checkboxes;
};
struct DIALOG_REANNOTATE