Skip to content
Extraits de code Groupes Projets
Valider ffe79665 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

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.
parent a08e582d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -69,6 +69,14 @@ class TimeEdit : public wxTextCtrl { ...@@ -69,6 +69,14 @@ class TimeEdit : public wxTextCtrl {
void OnChar(wxKeyEvent &event); void OnChar(wxKeyEvent &event);
void OnModified(wxCommandEvent &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: public:
/// Get the current time as an AssTime object /// Get the current time as an AssTime object
AssTime GetTime() const { return time; } AssTime GetTime() const { return time; }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter