mirror of https://github.com/odrling/Aegisub
parent
a75c8705bb
commit
427c8406d5
|
@ -261,6 +261,17 @@ bool DialogSpellChecker::CheckLine(AssDialogue *active_line, int start_pos, int
|
|||
|
||||
std::map<wxString, wxString>::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);
|
||||
#endif
|
||||
|
||||
SelectionController<AssDialogue>::Selection sel;
|
||||
sel.insert(active_line);
|
||||
context->selectionController->SetSelectionAndActive(sel, active_line);
|
||||
|
|
Loading…
Reference in New Issue