Simulator dialogs: Fix incorrect handling of Validate(), which was called for all widgets by the default wxID_OK button handler. It is now called only for the active page of these dialogs (as wanted in code), therefore only for used widgets.
Note: strangely, this issue was noticed only on Windows, not on Linux.
This commit is contained in:
parent
48f916bd63
commit
f3d4f7322b
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue