Fix incorrect close function in HTML_MESSAGE_BOX (whichcan be shown in modal or not modal mode)
This commit is contained in:
parent
834b31b491
commit
35c23f3135
|
@ -39,7 +39,12 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString& aTitle,
|
|||
|
||||
void HTML_MESSAGE_BOX::OnCloseButtonClick( wxCommandEvent& event )
|
||||
{
|
||||
EndModal( 0 );
|
||||
// the dialog can be shown modal or not modal.
|
||||
// therefore, use the right way to close it.
|
||||
if( IsModal() )
|
||||
EndModal( 0 );
|
||||
else
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue