Replace SubsEditBox::OnUndoTimer with a lambda
This commit is contained in:
parent
b507f49cec
commit
67d796731a
2 changed files with 1 additions and 6 deletions
|
@ -183,7 +183,7 @@ SubsEditBox::SubsEditBox(wxWindow *parent, agi::Context *context)
|
||||||
Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &SubsEditBox::OnCommentChange, this, CommentBox->GetId());
|
Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &SubsEditBox::OnCommentChange, this, CommentBox->GetId());
|
||||||
|
|
||||||
Bind(wxEVT_SIZE, &SubsEditBox::OnSize, this);
|
Bind(wxEVT_SIZE, &SubsEditBox::OnSize, this);
|
||||||
Bind(wxEVT_TIMER, &SubsEditBox::OnUndoTimer, this);
|
Bind(wxEVT_TIMER, [=](wxTimerEvent&) { commitId = -1; });
|
||||||
|
|
||||||
wxSizeEvent evt;
|
wxSizeEvent evt;
|
||||||
OnSize(evt);
|
OnSize(evt);
|
||||||
|
@ -378,10 +378,6 @@ void SubsEditBox::OnChange(wxStyledTextEvent &event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubsEditBox::OnUndoTimer(wxTimerEvent&) {
|
|
||||||
commitId = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class setter>
|
template<class setter>
|
||||||
void SubsEditBox::SetSelectedRows(setter set, wxString const& desc, int type, bool amend) {
|
void SubsEditBox::SetSelectedRows(setter set, wxString const& desc, int type, bool amend) {
|
||||||
for_each(sel.begin(), sel.end(), set);
|
for_each(sel.begin(), sel.end(), set);
|
||||||
|
|
|
@ -155,7 +155,6 @@ class SubsEditBox : public wxPanel {
|
||||||
void OnCommentChange(wxCommandEvent &);
|
void OnCommentChange(wxCommandEvent &);
|
||||||
void OnEffectChange(wxCommandEvent &);
|
void OnEffectChange(wxCommandEvent &);
|
||||||
void OnSize(wxSizeEvent &event);
|
void OnSize(wxSizeEvent &event);
|
||||||
void OnUndoTimer(wxTimerEvent&);
|
|
||||||
|
|
||||||
void SetPlaceholderCtrl(wxControl *ctrl, wxString const& value);
|
void SetPlaceholderCtrl(wxControl *ctrl, wxString const& value);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue