FIX: tempinput popup focus event
Change-Id: I6973d9f23267265ec91ab04a3b7d53e3bf20c3d4
This commit is contained in:
parent
c0b0249194
commit
22c71f7884
|
@ -49,6 +49,8 @@ void TempInput::Create(wxWindow *parent, wxString text, wxString label, wxString
|
||||||
text_ctrl->SetMaxLength(3);
|
text_ctrl->SetMaxLength(3);
|
||||||
state_handler.attach_child(text_ctrl);
|
state_handler.attach_child(text_ctrl);
|
||||||
text_ctrl->Bind(wxEVT_SET_FOCUS, [this](auto &e) {
|
text_ctrl->Bind(wxEVT_SET_FOCUS, [this](auto &e) {
|
||||||
|
e.SetId(GetId());
|
||||||
|
ProcessEventLocally(e);
|
||||||
e.Skip();
|
e.Skip();
|
||||||
if (m_read_only) return;
|
if (m_read_only) return;
|
||||||
// enter input mode
|
// enter input mode
|
||||||
|
@ -62,6 +64,9 @@ void TempInput::Create(wxWindow *parent, wxString text, wxString label, wxString
|
||||||
if (m_read_only) { SetCursor(wxCURSOR_ARROW); }
|
if (m_read_only) { SetCursor(wxCURSOR_ARROW); }
|
||||||
});
|
});
|
||||||
text_ctrl->Bind(wxEVT_KILL_FOCUS, [this](auto &e) {
|
text_ctrl->Bind(wxEVT_KILL_FOCUS, [this](auto &e) {
|
||||||
|
e.SetId(GetId());
|
||||||
|
ProcessEventLocally(e);
|
||||||
|
e.Skip();
|
||||||
OnEdit();
|
OnEdit();
|
||||||
auto temp = text_ctrl->GetValue();
|
auto temp = text_ctrl->GetValue();
|
||||||
if (temp.ToStdString().empty()) {
|
if (temp.ToStdString().empty()) {
|
||||||
|
|
Loading…
Reference in New Issue