From 5eb14a1f7a9114ca38ce19e580034688f60bfd84 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 13 Jun 2012 15:58:24 +0000 Subject: [PATCH] Maybe really fix hurr durr gtk. Closes #1474. Originally committed to SVN as r6903. --- aegisub/src/dialog_spellchecker.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/aegisub/src/dialog_spellchecker.cpp b/aegisub/src/dialog_spellchecker.cpp index e4ca5467a..642fb9762 100644 --- a/aegisub/src/dialog_spellchecker.cpp +++ b/aegisub/src/dialog_spellchecker.cpp @@ -262,14 +262,9 @@ bool DialogSpellChecker::CheckLine(AssDialogue *active_line, int start_pos, int std::map::const_iterator auto_rep = auto_replace.find(word); if (auto_rep == auto_replace.end()) { #ifdef __WXGTK__ - // After changing the value of the edit box, removing text from - // text controls doesn't work until the end of the event handler - // (i.e. orig_word->Clear(); assert(orig_word->IsEmpty()); will - // fail). I have no idea why. - // - // We can't just call SetWord here only because if the new line is - // longer than the old one the selection may not get set correctly. - SetWord(word); + // http://trac.wxwidgets.org/ticket/14369 + orig_word->Remove(0, -1); + replace_word->Remove(0, -1); #endif SelectionController::Selection sel;