return correct dialog return code for exec
This commit is contained in:
committed by
Vadim Zeitlin
parent
52a7a1c5e6
commit
7e7530f010
@@ -69,7 +69,10 @@ int wxDialog::ShowModal()
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( GetHandle() != NULL, -1, "Invalid dialog" );
|
wxCHECK_MSG( GetHandle() != NULL, -1, "Invalid dialog" );
|
||||||
|
|
||||||
return GetDialogHandle()->exec() ? wxID_OK : wxID_CANCEL;
|
bool ret = GetDialogHandle()->exec();
|
||||||
|
if(GetReturnCode() == 0)
|
||||||
|
return ret ? wxID_OK : wxID_CANCEL;
|
||||||
|
return GetReturnCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::EndModal(int retCode)
|
void wxDialog::EndModal(int retCode)
|
||||||
@@ -77,7 +80,7 @@ void wxDialog::EndModal(int retCode)
|
|||||||
wxCHECK_RET( GetDialogHandle() != NULL, "Invalid dialog" );
|
wxCHECK_RET( GetDialogHandle() != NULL, "Invalid dialog" );
|
||||||
|
|
||||||
SetReturnCode(retCode);
|
SetReturnCode(retCode);
|
||||||
GetDialogHandle()->done( retCode );
|
GetDialogHandle()->done( QDialog::Accepted );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDialog::IsModal() const
|
bool wxDialog::IsModal() const
|
||||||
|
Reference in New Issue
Block a user