Text Selection refactoring of Ralph - continuation of PR #238 - fixing final tests#240
Merged
Conversation
… & all test output files named differently in relation to their test method
…ch4XY and selection4XY & exchanging global TextSelection & TextNavigation variables with local ones!
…ared by all active TextNavigator instances - otherwise one is changing and the other has a dirty cached next instance, which will never be found -> loop
9bf1661 to
f93eff2
Compare
…hanging slower Hashtable with HashMap and Vector with ArrayList
rsoika
approved these changes
Jul 11, 2023
rsoika
left a comment
Collaborator
There was a problem hiding this comment.
yes - works now perfect!
rsoika
requested changes
Jul 11, 2023
rsoika
left a comment
Collaborator
There was a problem hiding this comment.
Ok - I understand and yes this is a perfect solution to get away form the singleton.
But what do think about adding a method resetSelections
this can be necessary if user did first search and modify the doc and than - before he saves the document - what to modify the result again - now she should have the chance to reset the current selections ?
Contributor
Author
|
Sure, the SelectionManager could offer such a functionality. Let me update! |
Contributor
Author
|
I called the method unregisterAll() as there was already a method called: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have reviewed and continued Ralph's PR #238
The Fix in the Nutshell:
Realized that two navigators where working on the same DOC and one was changing the DOC, but the other had a cached selection, which was not updated as the prior STATIC SelectionManager should now be moved to the OdfDocument instance to be able to dirty flag
According to GitHub docu - and from my understanding of it - I can only contribute to a PR, by creating a new one:
https://docs.github.com/de/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
This is what I did today: