-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically add character names to dictionary #839
base: develop
Are you sure you want to change the base?
Conversation
That was the easy part. Now I have to find a good place in the code base when the character models are loaded, as well as the spellcheck, to pipe the data in to the dictionary...
You are right about the highlighter. I would recommend looking at the code of the context menu in However in your case, you should probably consider using |
I feel like this is ready to be reviewed. I have tested it on my machine and everything seems to be working. |
I will review this very soon. You can already try to squash the commits down to one and rebase to the main branch if necessary. So merging won't make any problems. |
Ok, I have looked at the code and how it's working. I think technically it works fine but there are still some problems which should be fixed, I think:
Otherwise I really like the comments and the event usage. But maybe also rename 'onDictionaryChanged' and 'onCharacterModelChanged' since they don't represent bound events but methods to change attributes. Maybe even remove the names from the old (spellcheck-)dictionary if it changes. |
This is still a work in progress. There is an issue in that newly added character names don't seem to immediately be recognized; they still are underlined red and marked as spelled incorrectly. I think this issue is probably because
highligher.rehighlight()
needs to be called for the text view(s) after the name is added to the dictionary. Trouble is, I'm not sure the best way to get a reference to that from the context of the spellchecker.I will continue working on this as time permits. Comments are welcome.