kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #17414
[PATCH] Assertion failure and can't close Hotkeys List
When the Hotkeys List was changed to non-modal, its OnCloseButtonClick()
was not changed to reflect the fact that modal and modeless dialogs have
to be closed differently in wx. Here's a patch to fix that, which should
work for all HTML_MESSAGE_BOXes whether or not they're modal.
Chris
diff --git a/common/html_messagebox.cpp b/common/html_messagebox.cpp
index 17a2c97..00a4775 100644
--- a/common/html_messagebox.cpp
+++ b/common/html_messagebox.cpp
@@ -39,7 +39,14 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString& aTitle,
void HTML_MESSAGE_BOX::OnCloseButtonClick( wxCommandEvent& event )
{
- EndModal( 0 );
+ if( IsModal() )
+ {
+ EndModal( 0 );
+ }
+ else
+ {
+ Destroy();
+ }
}
Follow ups