-
Notifications
You must be signed in to change notification settings - Fork 242
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
Change model query in place for Journal ListView, fixes #4852 #542
Change model query in place for Journal ListView, fixes #4852 #542
Conversation
This commit changes the way the list view model updates occur. Instead of replacing the ListModel, we now just change the result set query. This means that the buggy scroll position setting code is no longer needed. Infact, a lot of code is removed Steps to test: * Go to the Journal * Open an item in the details view * Change title or star status * Click back * Notice how it has updated and the scroll position preserved Other things tested: * Changing mountpoints * Selections and changing mountpoints * Selection preservation after refresh * Changing the filter
Ok, let's aim to 108 for this patch! |
Is there a feature page? I don't understand your pull request yet; it doesn't look like a feature, but rather an optimisation. But I don't understand the impact. Is there a bug number that would tell me more? |
Yes it is an optimization, but it also fixes http://bugs.sugarlabs.org/ticket/4852 |
Thanks, I've reproduced 4852 now. |
Is this a replacement for #520? |
@tchx84, no, is a complement. This patch solves the case of going to the detail view, modify the metadata (change star, title or description) and go back to the listview |
@@ -92,8 +90,19 @@ def __init__(self, query): | |||
# avoid hitting D-Bus and disk. | |||
self.view_is_resizing = False | |||
|
|||
def set_query(self, query, clear_selection=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we were merging this along side #520, we would need to reset the self._updated_entries table here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @samdroid-apps I am slow with reviews this week. Could you prepare a new pr with the patch in #520, and this one modified to make easier test all together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do, see #564
Replaced with #564 |
This commit changes the way the list view model updates occur.
Instead of replacing the ListModel, we now just change the result set
query.
This means that the buggy scroll position setting code is no longer
needed. Infact, a lot of code is removed
Steps to test:
Other things tested: