Reinstate close/cancel handling for ERC dialog.
It needs it because it's a modeless dialog. Fixes: lp:1785655 * https://bugs.launchpad.net/kicad/+bug/1785655
This commit is contained in:
parent
d788c9d479
commit
9aa043ef48
|
@ -166,6 +166,18 @@ void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
// This is a modeless dialog so we have to handle these ourselves.
|
||||
void DIALOG_ERC::OnButtonCloseClick( wxCommandEvent& event )
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_ERC::OnCloseErcDialog( wxCloseEvent& event )
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_ERC::OnResetMatrixClick( wxCommandEvent& event )
|
||||
{
|
||||
|
|
|
@ -58,8 +58,10 @@ private:
|
|||
void Init();
|
||||
|
||||
// from DIALOG_ERC_BASE:
|
||||
void OnCloseErcDialog( wxCloseEvent& event ) override;
|
||||
void OnErcCmpClick( wxCommandEvent& event ) override;
|
||||
void OnEraseDrcMarkersClick( wxCommandEvent& event ) override;
|
||||
void OnButtonCloseClick( wxCommandEvent& event ) override;
|
||||
void OnResetMatrixClick( wxCommandEvent& event ) override;
|
||||
|
||||
// Click on a marker info:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Aug 2 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -165,9 +165,11 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
|
|||
this->Layout();
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
|
||||
m_MarkersList->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
|
||||
m_MarkersList->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
|
||||
m_buttondelmarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
|
||||
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
|
||||
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
|
||||
m_ResetOptButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
|
||||
}
|
||||
|
@ -175,9 +177,11 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
|
|||
DIALOG_ERC_BASE::~DIALOG_ERC_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
|
||||
m_MarkersList->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLeftClickMarkersList ), NULL, this );
|
||||
m_MarkersList->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_ERC_BASE::OnLeftDblClickMarkersList ), NULL, this );
|
||||
m_buttondelmarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnEraseDrcMarkersClick ), NULL, this );
|
||||
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnButtonCloseClick ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnErcCmpClick ), NULL, this );
|
||||
m_ResetOptButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnResetMatrixClick ), NULL, this );
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Aug 2 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -26,11 +26,11 @@ class ERC_HTML_LISTFRAME;
|
|||
#include <wx/checkbox.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/html/htmlwin.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
|
@ -72,9 +72,11 @@ class DIALOG_ERC_BASE : public DIALOG_SHIM
|
|||
wxButton* m_ResetOptButton;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCloseErcDialog( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnLeftClickMarkersList( wxHtmlLinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnLeftDblClickMarkersList( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void OnEraseDrcMarkersClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnButtonCloseClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnErcCmpClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnResetMatrixClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue