FIX:Use wxEVT_COMMAND_BUTTON_CLICKED to replace wxEVT_LEFT_DOWN

jira: none
Change-Id: Id839e22d7625031635e974e440e3400f0a4003e0
(cherry picked from commit d570691c1da2d3d3c3779cd628544c61829b7209)
This commit is contained in:
zhou.xu
2025-02-14 19:48:17 +08:00
committed by Noisyfox
parent 34b5b96400
commit a83569d82a
2 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
m_button_ok->SetCornerRadius(FromDIP(6));
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
m_button_ok->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) { deal_ok(); });
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_ok(); });
m_button_cancel = new Button(this, cancel_text);
m_button_cancel->SetBackgroundColor(btn_bg_white);
@@ -83,7 +83,7 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
m_button_cancel->SetCornerRadius(FromDIP(6));
bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
m_button_cancel->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) { deal_cancel(); });
m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_cancel(); });
m_sizer_main->Add(bSizer_button, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(20));

View File

@@ -1349,7 +1349,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
m_button_ok->SetCornerRadius(FromDIP(12));
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
m_button_ok->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
deal_ok();
EndModal(wxID_YES);
SetFocusIgnoringChildren();
@@ -1367,7 +1367,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
m_button_cancel->SetCornerRadius(FromDIP(12));
bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
m_button_cancel->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
EndModal(wxID_CANCEL);
});