panel_board_finish: mark board as modified when a finishing parameter is modified.
Fixes #13074 https://gitlab.com/kicad/code/kicad/issues/13074
This commit is contained in:
parent
295ef6588d
commit
c3dddaf41f
|
@ -31,11 +31,12 @@
|
||||||
#include <wx/treebook.h>
|
#include <wx/treebook.h>
|
||||||
|
|
||||||
|
|
||||||
PANEL_SETUP_BOARD_FINISH::PANEL_SETUP_BOARD_FINISH( PAGED_DIALOG* aParent, BOARD* aBoard ) :
|
PANEL_SETUP_BOARD_FINISH::PANEL_SETUP_BOARD_FINISH( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame ) :
|
||||||
PANEL_SETUP_BOARD_FINISH_BASE( aParent->GetTreebook() )
|
PANEL_SETUP_BOARD_FINISH_BASE( aParent->GetTreebook() )
|
||||||
{
|
{
|
||||||
m_parentDialog = aParent;
|
m_parentDialog = aParent;
|
||||||
m_board = aBoard;
|
m_frame = aFrame;
|
||||||
|
m_board = m_frame->GetBoard();
|
||||||
m_brdSettings = &m_board->GetDesignSettings();
|
m_brdSettings = &m_board->GetDesignSettings();
|
||||||
|
|
||||||
// Get the translated list of choices and init m_choiceFinish
|
// Get the translated list of choices and init m_choiceFinish
|
||||||
|
@ -84,14 +85,20 @@ bool PANEL_SETUP_BOARD_FINISH::TransferDataFromWindow()
|
||||||
|
|
||||||
wxArrayString finish_list = GetStandardCopperFinishes( false );
|
wxArrayString finish_list = GetStandardCopperFinishes( false );
|
||||||
int finish = m_choiceFinish->GetSelection() >= 0 ? m_choiceFinish->GetSelection() : 0;
|
int finish = m_choiceFinish->GetSelection() >= 0 ? m_choiceFinish->GetSelection() : 0;
|
||||||
|
bool modified = brd_stackup.m_FinishType == finish_list[finish];
|
||||||
brd_stackup.m_FinishType = finish_list[finish];
|
brd_stackup.m_FinishType = finish_list[finish];
|
||||||
|
|
||||||
int edge = m_choiceEdgeConn->GetSelection();;
|
int edge = m_choiceEdgeConn->GetSelection();
|
||||||
|
modified |= brd_stackup.m_EdgeConnectorConstraints == (BS_EDGE_CONNECTOR_CONSTRAINTS) edge;
|
||||||
brd_stackup.m_EdgeConnectorConstraints = (BS_EDGE_CONNECTOR_CONSTRAINTS) edge;
|
brd_stackup.m_EdgeConnectorConstraints = (BS_EDGE_CONNECTOR_CONSTRAINTS) edge;
|
||||||
|
|
||||||
brd_stackup.m_CastellatedPads = m_cbCastellatedPads->GetValue();
|
brd_stackup.m_CastellatedPads = m_cbCastellatedPads->GetValue();
|
||||||
|
modified |= brd_stackup.m_EdgePlating == m_cbEgdesPlated->GetValue();
|
||||||
brd_stackup.m_EdgePlating = m_cbEgdesPlated->GetValue();
|
brd_stackup.m_EdgePlating = m_cbEgdesPlated->GetValue();
|
||||||
|
|
||||||
|
if( modified )
|
||||||
|
m_frame->OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class PCB_EDIT_FRAME;
|
||||||
class PANEL_SETUP_BOARD_FINISH : public PANEL_SETUP_BOARD_FINISH_BASE
|
class PANEL_SETUP_BOARD_FINISH : public PANEL_SETUP_BOARD_FINISH_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PANEL_SETUP_BOARD_FINISH( PAGED_DIALOG* aParent, BOARD* aBoard );
|
PANEL_SETUP_BOARD_FINISH( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame );
|
||||||
~PANEL_SETUP_BOARD_FINISH();
|
~PANEL_SETUP_BOARD_FINISH();
|
||||||
|
|
||||||
void ImportSettingsFrom( BOARD* aBoard );
|
void ImportSettingsFrom( BOARD* aBoard );
|
||||||
|
@ -49,6 +49,7 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PAGED_DIALOG* m_parentDialog;
|
PAGED_DIALOG* m_parentDialog;
|
||||||
|
PCB_EDIT_FRAME* m_frame;
|
||||||
BOARD* m_board;
|
BOARD* m_board;
|
||||||
BOARD_DESIGN_SETTINGS* m_brdSettings;
|
BOARD_DESIGN_SETTINGS* m_brdSettings;
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,7 +65,7 @@ DIALOG_BOARD_SETUP::DIALOG_BOARD_SETUP( PCB_EDIT_FRAME* aFrame ) :
|
||||||
m_tracksAndVias = new PANEL_SETUP_TRACKS_AND_VIAS( this, aFrame );
|
m_tracksAndVias = new PANEL_SETUP_TRACKS_AND_VIAS( this, aFrame );
|
||||||
m_maskAndPaste = new PANEL_SETUP_MASK_AND_PASTE( this, aFrame );
|
m_maskAndPaste = new PANEL_SETUP_MASK_AND_PASTE( this, aFrame );
|
||||||
m_physicalStackup = new PANEL_SETUP_BOARD_STACKUP( this, aFrame, m_layers );
|
m_physicalStackup = new PANEL_SETUP_BOARD_STACKUP( this, aFrame, m_layers );
|
||||||
m_boardFinish = new PANEL_SETUP_BOARD_FINISH( this, board );
|
m_boardFinish = new PANEL_SETUP_BOARD_FINISH( this, aFrame );
|
||||||
|
|
||||||
m_severities = new PANEL_SETUP_SEVERITIES( this, DRC_ITEM::GetItemsWithSeverities(),
|
m_severities = new PANEL_SETUP_SEVERITIES( this, DRC_ITEM::GetItemsWithSeverities(),
|
||||||
bds.m_DRCSeverities );
|
bds.m_DRCSeverities );
|
||||||
|
|
Loading…
Reference in New Issue