diff --git a/eeschema/dialogs/dialog_sim_settings.h b/eeschema/dialogs/dialog_sim_settings.h index 9549fe2f26..233c9de96c 100644 --- a/eeschema/dialogs/dialog_sim_settings.h +++ b/eeschema/dialogs/dialog_sim_settings.h @@ -65,6 +65,15 @@ public: bool TransferDataFromWindow() override; bool TransferDataToWindow() override; + // The default dialog Validate() calls the validators of all widgets. + // This is not what we want; We want only validators of the selected page + // of the notbooks. So disable the wxDialog::Validate(), and let our + // TransferDataFromWindow doing the job. + virtual bool Validate() override + { + return true; + } + int ShowModal() override; private: diff --git a/eeschema/dialogs/dialog_spice_model.h b/eeschema/dialogs/dialog_spice_model.h index 7deda7e5b9..6dc388347c 100644 --- a/eeschema/dialogs/dialog_spice_model.h +++ b/eeschema/dialogs/dialog_spice_model.h @@ -76,8 +76,17 @@ private: */ bool addPwlValue( const wxString& aTime, const wxString& aValue ); - bool TransferDataFromWindow() override; - bool TransferDataToWindow() override; + virtual bool TransferDataFromWindow() override; + virtual bool TransferDataToWindow() override; + + // The default dialog Validate() calls the validators of all widgets. + // This is not what we want; We want only validators of the selected page + // of the notbooks. So disable the wxDialog::Validate(), and let our + // TransferDataFromWindow doing the job. + virtual bool Validate() override + { + return true; + } virtual void onInitDlg( wxInitDialogEvent& event ) override {