Treat action buttons in Symbol/Footprint Properties as OK, not Cancel.

Fixes https://gitlab.com/kicad/code/kicad/issues/7001
This commit is contained in:
Jeff Young 2021-03-01 20:36:18 +00:00
parent 57e948ff08
commit 7760570d76
2 changed files with 28 additions and 12 deletions

View File

@ -906,25 +906,29 @@ void DIALOG_SYMBOL_PROPERTIES::OnMoveDown( wxCommandEvent& event )
void DIALOG_SYMBOL_PROPERTIES::OnEditSymbol( wxCommandEvent& ) void DIALOG_SYMBOL_PROPERTIES::OnEditSymbol( wxCommandEvent& )
{ {
EndQuasiModal( SYMBOL_PROPS_EDIT_SCHEMATIC_SYMBOL ); if( TransferDataFromWindow() )
EndQuasiModal( SYMBOL_PROPS_EDIT_SCHEMATIC_SYMBOL );
} }
void DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol( wxCommandEvent& ) void DIALOG_SYMBOL_PROPERTIES::OnEditLibrarySymbol( wxCommandEvent& )
{ {
EndQuasiModal( SYMBOL_PROPS_EDIT_LIBRARY_SYMBOL ); if( TransferDataFromWindow() )
EndQuasiModal( SYMBOL_PROPS_EDIT_LIBRARY_SYMBOL );
} }
void DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol( wxCommandEvent& ) void DIALOG_SYMBOL_PROPERTIES::OnUpdateSymbol( wxCommandEvent& )
{ {
EndQuasiModal( SYMBOL_PROPS_WANT_UPDATE_SYMBOL ); if( TransferDataFromWindow() )
EndQuasiModal( SYMBOL_PROPS_WANT_UPDATE_SYMBOL );
} }
void DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol( wxCommandEvent& ) void DIALOG_SYMBOL_PROPERTIES::OnExchangeSymbol( wxCommandEvent& )
{ {
EndQuasiModal( SYMBOL_PROPS_WANT_EXCHANGE_SYMBOL ); if( TransferDataFromWindow() )
EndQuasiModal( SYMBOL_PROPS_WANT_EXCHANGE_SYMBOL );
} }

View File

@ -203,29 +203,41 @@ DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES()
void DIALOG_FOOTPRINT_PROPERTIES::EditFootprint( wxCommandEvent& ) void DIALOG_FOOTPRINT_PROPERTIES::EditFootprint( wxCommandEvent& )
{ {
m_returnValue = FP_PROPS_EDIT_BOARD_FP; if( TransferDataFromWindow() )
Close(); {
m_returnValue = FP_PROPS_EDIT_BOARD_FP;
Close();
}
} }
void DIALOG_FOOTPRINT_PROPERTIES::EditLibraryFootprint( wxCommandEvent& ) void DIALOG_FOOTPRINT_PROPERTIES::EditLibraryFootprint( wxCommandEvent& )
{ {
m_returnValue = FP_PROPS_EDIT_LIBRARY_FP; if( TransferDataFromWindow() )
Close(); {
m_returnValue = FP_PROPS_EDIT_LIBRARY_FP;
Close();
}
} }
void DIALOG_FOOTPRINT_PROPERTIES::UpdateFootprint( wxCommandEvent& ) void DIALOG_FOOTPRINT_PROPERTIES::UpdateFootprint( wxCommandEvent& )
{ {
m_returnValue = FP_PROPS_UPDATE_FP; if( TransferDataFromWindow() )
Close(); {
m_returnValue = FP_PROPS_UPDATE_FP;
Close();
}
} }
void DIALOG_FOOTPRINT_PROPERTIES::ChangeFootprint( wxCommandEvent& ) void DIALOG_FOOTPRINT_PROPERTIES::ChangeFootprint( wxCommandEvent& )
{ {
m_returnValue = FP_PROPS_CHANGE_FP; if( TransferDataFromWindow() )
Close(); {
m_returnValue = FP_PROPS_CHANGE_FP;
Close();
}
} }