forked from mia/Aegisub
Don't allow opening multiple copies of the spell checker dialog
Originally committed to SVN as r6757.
This commit is contained in:
parent
47fb50d4d3
commit
f1b2b4a3da
3 changed files with 2 additions and 8 deletions
|
@ -52,6 +52,7 @@
|
|||
#include "../ass_file.h"
|
||||
#include "../compat.h"
|
||||
#include "../dialog_attachments.h"
|
||||
#include "../dialog_manager.h"
|
||||
#include "../dialog_properties.h"
|
||||
#include "../dialog_search_replace.h"
|
||||
#include "../dialog_spellchecker.h"
|
||||
|
@ -437,7 +438,7 @@ struct subtitle_spellcheck : public Command {
|
|||
|
||||
void operator()(agi::Context *c) {
|
||||
c->videoController->Stop();
|
||||
new DialogSpellChecker(c);
|
||||
c->dialog->Show<DialogSpellChecker>(c);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -157,8 +157,6 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
|||
|
||||
if (FindNext())
|
||||
Show();
|
||||
|
||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogSpellChecker::OnClose, this, wxID_CANCEL);
|
||||
}
|
||||
|
||||
DialogSpellChecker::~DialogSpellChecker() {
|
||||
|
@ -201,10 +199,6 @@ void DialogSpellChecker::OnChangeSuggestion(wxCommandEvent&) {
|
|||
replace_word->SetValue(suggest_list->GetStringSelection());
|
||||
}
|
||||
|
||||
void DialogSpellChecker::OnClose(wxCommandEvent&) {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
bool DialogSpellChecker::FindNext() {
|
||||
AssDialogue *real_active_line = context->selectionController->GetActiveLine();
|
||||
// User has changed the active line; restart search from this position
|
||||
|
|
|
@ -96,7 +96,6 @@ class DialogSpellChecker : public wxDialog {
|
|||
void OnIgnore(wxCommandEvent&);
|
||||
void OnIgnoreAll(wxCommandEvent&);
|
||||
void OnAdd(wxCommandEvent&);
|
||||
void OnClose(wxCommandEvent&);
|
||||
|
||||
public:
|
||||
DialogSpellChecker(agi::Context *context);
|
||||
|
|
Loading…
Reference in a new issue