Work around wxGTK issues with time edits
Modifying the contents of a text control after IM processing happens in the same cycle of the event loop seems to be seriously broken. Work around this by disabling IM processing for time edits, as it should never be relevant for them anyway. Closes #1679. Closes #1680.
This commit is contained in:
parent
5298634721
commit
1cbf20f8ab
1 changed files with 8 additions and 0 deletions
|
@ -69,6 +69,14 @@ class TimeEdit : public wxTextCtrl {
|
|||
void OnChar(wxKeyEvent &event);
|
||||
void OnModified(wxCommandEvent &event);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
// IM processing completely breaks modifying a text ctrl's in response to
|
||||
// wxEVT_CHAR (changing the value clears it and modifying the insertion
|
||||
// point does nothing). IM processing should never be relevant here, so
|
||||
// just disable it.
|
||||
int GTKIMFilterKeypress(GdkEventKey *) const override { return 0; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
/// Get the current time as an AssTime object
|
||||
AssTime GetTime() const { return time; }
|
||||
|
|
Loading…
Reference in a new issue