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
aegisub/src
|
@ -52,6 +52,7 @@
|
||||||
#include "../ass_file.h"
|
#include "../ass_file.h"
|
||||||
#include "../compat.h"
|
#include "../compat.h"
|
||||||
#include "../dialog_attachments.h"
|
#include "../dialog_attachments.h"
|
||||||
|
#include "../dialog_manager.h"
|
||||||
#include "../dialog_properties.h"
|
#include "../dialog_properties.h"
|
||||||
#include "../dialog_search_replace.h"
|
#include "../dialog_search_replace.h"
|
||||||
#include "../dialog_spellchecker.h"
|
#include "../dialog_spellchecker.h"
|
||||||
|
@ -437,7 +438,7 @@ struct subtitle_spellcheck : public Command {
|
||||||
|
|
||||||
void operator()(agi::Context *c) {
|
void operator()(agi::Context *c) {
|
||||||
c->videoController->Stop();
|
c->videoController->Stop();
|
||||||
new DialogSpellChecker(c);
|
c->dialog->Show<DialogSpellChecker>(c);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,8 +157,6 @@ DialogSpellChecker::DialogSpellChecker(agi::Context *context)
|
||||||
|
|
||||||
if (FindNext())
|
if (FindNext())
|
||||||
Show();
|
Show();
|
||||||
|
|
||||||
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &DialogSpellChecker::OnClose, this, wxID_CANCEL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogSpellChecker::~DialogSpellChecker() {
|
DialogSpellChecker::~DialogSpellChecker() {
|
||||||
|
@ -201,10 +199,6 @@ void DialogSpellChecker::OnChangeSuggestion(wxCommandEvent&) {
|
||||||
replace_word->SetValue(suggest_list->GetStringSelection());
|
replace_word->SetValue(suggest_list->GetStringSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogSpellChecker::OnClose(wxCommandEvent&) {
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DialogSpellChecker::FindNext() {
|
bool DialogSpellChecker::FindNext() {
|
||||||
AssDialogue *real_active_line = context->selectionController->GetActiveLine();
|
AssDialogue *real_active_line = context->selectionController->GetActiveLine();
|
||||||
// User has changed the active line; restart search from this position
|
// User has changed the active line; restart search from this position
|
||||||
|
|
|
@ -96,7 +96,6 @@ class DialogSpellChecker : public wxDialog {
|
||||||
void OnIgnore(wxCommandEvent&);
|
void OnIgnore(wxCommandEvent&);
|
||||||
void OnIgnoreAll(wxCommandEvent&);
|
void OnIgnoreAll(wxCommandEvent&);
|
||||||
void OnAdd(wxCommandEvent&);
|
void OnAdd(wxCommandEvent&);
|
||||||
void OnClose(wxCommandEvent&);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DialogSpellChecker(agi::Context *context);
|
DialogSpellChecker(agi::Context *context);
|
||||||
|
|
Loading…
Reference in a new issue