FIX:replace button click event for pop dialog

jira:[none]

Change-Id: I2d36a10ffeb128f1fcc8aedab5eb5ea286f8a1dc
(cherry picked from commit 4030bde50df95e6ee861aa7369e7e15cf61f36a9)
This commit is contained in:
tao wang
2024-11-29 17:54:45 +08:00
committed by Noisyfox
parent 40bdbed840
commit 7b81f21093

View File

@@ -590,7 +590,7 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
m_button_ok->SetMaxSize(wxSize(-1, FromDIP(24)));
m_button_ok->SetCornerRadius(FromDIP(12));
m_button_ok->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& e) {
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& e) {
wxCommandEvent evt(EVT_SECONDARY_CHECK_CONFIRM, GetId());
e.SetEventObject(this);
GetEventHandler()->ProcessEvent(evt);
@@ -607,7 +607,7 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
m_button_retry->SetMaxSize(wxSize(-1, FromDIP(24)));
m_button_retry->SetCornerRadius(FromDIP(12));
m_button_retry->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& e) {
m_button_retry->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& e) {
wxCommandEvent evt(EVT_SECONDARY_CHECK_RETRY, GetId());
e.SetEventObject(this);
GetEventHandler()->ProcessEvent(evt);
@@ -623,7 +623,7 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
m_button_cancel->SetMaxSize(wxSize(-1, FromDIP(24)));
m_button_cancel->SetCornerRadius(FromDIP(12));
m_button_cancel->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& e) {
m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& e) {
wxCommandEvent evt(EVT_SECONDARY_CHECK_CANCEL);
e.SetEventObject(this);
GetEventHandler()->ProcessEvent(evt);
@@ -639,7 +639,7 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
m_button_fn->SetMaxSize(wxSize(-1, FromDIP(24)));
m_button_fn->SetCornerRadius(FromDIP(12));
m_button_fn->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& e) {
m_button_fn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& e) {
post_event(wxCommandEvent(EVT_SECONDARY_CHECK_DONE));
e.Skip();
});
@@ -653,7 +653,7 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
m_button_resume->SetMaxSize(wxSize(-1, FromDIP(24)));
m_button_resume->SetCornerRadius(FromDIP(12));
m_button_resume->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& e) {
m_button_resume->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& e) {
post_event(wxCommandEvent(EVT_SECONDARY_CHECK_RESUME));
e.Skip();
});