Skip to content
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 corrupted archive table list during refresh if sorting is enabled #784

Merged
merged 2 commits into from
Feb 11, 2021

Conversation

rblenis
Copy link
Contributor

@rblenis rblenis commented Feb 6, 2021

fix issue #783

@rblenis
Copy link
Contributor Author

rblenis commented Feb 6, 2021

The reason for disabling sorting while setting the row items is to prevent sorting while changing items. Here is a section of documentation for QTableWidget::setItem()

"Note that if sorting is enabled (see sortingEnabled) and column is the current sort column, the row will be moved to the sorted position determined by item.

If you want to set several items of a particular row (say, by calling setItem() in a loop), you may want to turn off sorting before doing so, and turn it back on afterwards; this will allow you to use the same row argument for all items in the same row (i.e. setItem() will not move the row)."

@m3nu
Copy link
Contributor

m3nu commented Feb 7, 2021

Interesting. So this ensures the table isn't messed up while editing it?

It seems to solve the reported bug. I couldn't trigger it while randomly sorting and deleting archives.

This solves it for you as well, @samuel-w ?

@m3nu m3nu requested a review from samuel-w February 7, 2021 00:39
@m3nu m3nu self-assigned this Feb 10, 2021
@m3nu m3nu added this to the 0.7.3 (Next minor release) milestone Feb 10, 2021
@m3nu m3nu merged commit 38cd7cd into borgbase:master Feb 11, 2021
@m3nu
Copy link
Contributor

m3nu commented Feb 11, 2021

Merged. Thanks for solving this! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants