-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix selection expanded after change. #2124
Fix selection expanded after change. #2124
Conversation
Test failure fixed by #2123. |
@arjclark Can you confirm this resolves the issue you reported? |
@oliver-sanders - tested and looks like this keeps the correct group open. Although the ordering of the groups themselves changes (so if you have two similar groups open you may miss the redraw), this change does address the immediate gotcha of ungrouping things that weren't there previously. I'm not sure how hard/feasible it would be to maintain the ordering of the groupings themselves though? |
Short Answer: Unfortunately sorting is handled internally within GTK. If the re-ordering is an issue the best you can do is to sort by the top level field (in the reported case this would be "packages"). Long Answer: I had a go at writing a manual iterator to work through the GTK data-structure (gtk.TreeStore via gtk.TreeModel) - one could then manually swap items as desired to effectively define an extra sorting layer. Unfortunately the sorting is handled internally in GTK creating a barrier between the stored and represented data meaning that this approach won't work. |
@oliver-sanders - thanks for the clarification. GTK vs. TreeViews/Stores once again proves a nuisance 🙁 Am happy for this to be the fix to close the reported issue. |
I'll wait for #2123 before merging this. |
|
3140de6
to
32b2cf5
Compare
The expanded selection was incorrectly updated in the event that the
TreeStore
was modified in a manner which caused a re-ordering of rows which in-turn affected a re-ordering of sections. This is a presentation layer bug as the underlying data-structure is not affected.The steps to reproduce are somewhat convoluted:
BaseSummaryDataPanel
class.Note: The bug applies to the
BaseSummaryDataPanel
class (from whichBaseStashSummaryDataPanelv1
inherits).