diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index fe90c65906..4da421ba17 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -50,6 +50,11 @@ int g_matchModeForUpdateSelected = ID_MATCH_FP_SELECTED; int g_matchModeForExchange = ID_MATCH_FP_REF; int g_matchModeForExchangeSelected = ID_MATCH_FP_SELECTED; +bool g_removeExtraTextItems = false; +bool g_resetTextItemLayers = false; +bool g_resetTextItemEffects = false; +bool g_reset3DModels = false; + DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aModule, bool updateMode, bool selectedMode ) : @@ -129,6 +134,11 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, default: break; } + m_removeExtraBox->SetValue( g_removeExtraTextItems ); + m_resetTextItemLayers->SetValue( g_resetTextItemLayers ); + m_resetTextItemEffects->SetValue( g_resetTextItemEffects ); + m_reset3DModels->SetValue( g_reset3DModels ); + // DIALOG_SHIM needs a unique hash_key because classname is not sufficient // because the update and change versions of this dialog have different controls. m_hash_key = TO_UTF8( GetTitle() ); @@ -144,6 +154,15 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, } +DIALOG_EXCHANGE_FOOTPRINTS::~DIALOG_EXCHANGE_FOOTPRINTS() +{ + g_removeExtraTextItems = m_removeExtraBox->GetValue(); + g_resetTextItemLayers = m_resetTextItemLayers->GetValue(); + g_resetTextItemEffects = m_resetTextItemEffects->GetValue(); + g_reset3DModels = m_reset3DModels->GetValue(); +} + + bool DIALOG_EXCHANGE_FOOTPRINTS::isMatch( MODULE* aModule ) { LIB_ID specifiedID; diff --git a/pcbnew/dialogs/dialog_exchange_footprints.h b/pcbnew/dialogs/dialog_exchange_footprints.h index 5657e33049..4351b0f5e2 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.h +++ b/pcbnew/dialogs/dialog_exchange_footprints.h @@ -45,6 +45,7 @@ private: public: DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aModule, bool updateMode, bool selectedMode ); + ~DIALOG_EXCHANGE_FOOTPRINTS() override; private: void updateMatchModeRadioButtons( wxUpdateUIEvent& event ) override;