Fix a serious issue in DIALOG_EDIT_LIBRARY_TABLES, on wxWidgets 3.1.x.

* in DIALOG_EDIT_LIBRARY_TABLES::TransferDataFromWindow(), m_contentPanel->TransferDataFromWindow
* is explicitly called to update library tables.
* Before wxWidgets 3.1.x, m_contentPanel->TransferDataFromWindow is not called by wxDialog::TransferDataFromWindow()
* and explicit call is needed.
* Since wxWidgets 3.1.x, m_contentPanel->TransferDataFromWindow is called by wxDialog::TransferDataFromWindow()
* thus creating two successive calls, not supported by m_contentPanel->TransferDataFromWindow.
* The call to wxDialog::TransferDataFromWindow() was just removed, as it is useless in this dialog
This commit is contained in:
jean-pierre charras 2018-07-26 19:42:43 +02:00
parent 944d22c08a
commit aa17e7919e
1 changed files with 9 additions and 6 deletions

View File

@ -68,18 +68,21 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
bool DIALOG_EDIT_LIBRARY_TABLES::TransferDataToWindow()
{
if( !DIALOG_SHIM::TransferDataToWindow() )
return false;
return m_contentPanel->TransferDataToWindow();
}
bool DIALOG_EDIT_LIBRARY_TABLES::TransferDataFromWindow()
{
if( !DIALOG_SHIM::TransferDataFromWindow() )
return false;
/* Transfer tables edited in dialog to the global and project tables:
* A good way is to use m_contentPanel->TransferDataFromWindow to do that.
* But be carefull:
* Since wxWidgets 3.1, it is called by wxDialog::TransferDataFromWindow()
* Before wxWidgets 3.1, it is *not* called by wxDialog::TransferDataFromWindow()
* m_contentPanel->TransferDataFromWindow do not works with two calls.
* Therefore *do not* call wxDialog::TransferDataFromWindow(),
* because m_contentPanel->TransferDataFromWindow() is called here.
*/
return m_contentPanel->TransferDataFromWindow();
}