Block ev_sidebar_tree_selection_changed handler during sidebar destroy#694
Open
jaeheonshim wants to merge 1 commit intolinuxmint:masterfrom
Open
Block ev_sidebar_tree_selection_changed handler during sidebar destroy#694jaeheonshim wants to merge 1 commit intolinuxmint:masterfrom
jaeheonshim wants to merge 1 commit intolinuxmint:masterfrom
Conversation
…y to avoid accidentally rewriting the last viewed page number.
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.
There was an issue where the last read page was not remembered for PDFs with more than 1500 pages (See #689).
This is because if the document has more than
MAX_ICON_VIEW_PAGE_COUNTpages (currently1500), thetree_viewis used instead of theicon_view. Theev_sidebar_tree_selection_changedhandler is registered on the selection object of the tree view to update the current document page when the user changes the selection. However, whengtk_list_store_clearis called, such as when the sidebar is disposed, "changed" is also emitted, causing the document page to be updated and as a result the page is always set to 0 when the long document is closed.I added a small amount of code to block this event handler while the list is being cleared, which seems to fix the issue.