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

Browse data columns size is reset when sorting #1475

Closed
justinclift opened this Issue Jul 14, 2018 · 14 comments

Comments

Projects
None yet
3 participants
@justinclift
Copy link
Member

justinclift commented Jul 14, 2018

Just noticed something weird when testing things out with our current code (dbd2d64).

In the Browse Data tab, if I've manually adjusted the size of some columns.. that size is lost/reset when I click on any column heading to sort by that column.

This is actually pretty annoying, as the size it reset back to (in the db I'm using atm) has fairly wide data in one field that I'm trying to read. So having to resize it to become fully visible after every sort operation is ugh. 😉

@justinclift justinclift added the bug label Jul 14, 2018

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Jul 25, 2018

I don't reproduce that behaviour. It is probably a bug in Qt or a difference in behaviour between platforms.

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Jul 25, 2018

Thanks @mgrojo. 😄

I don't remember which platform that was on at the time. Probably my Linux box. At some point I'll see if happens with the Windows nightlies, just to see if there's a difference. 😄

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Aug 10, 2018

I have the same issue. I think it came up with Qt 5.10 or similar. We've already worked around a similar issue which would show the rowid column each time the view is sorted.

MKleusberg added a commit that referenced this issue Aug 10, 2018

Fix browse table settings not being reapplied correctly
We have already fixed the rowid column from appearing after almost every
action in the Browse Data tab, for example in commit
39302f5.

This didn't fix every issue related to this problem though. Hidden
columns are shown too and modified column widths are reset. Also this
happens for different actions, for example the column widths are also
reset when sorting the view or when changing the filters. All these
problems are hopefully fixed by this commit.

See issue #1475.
@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Aug 10, 2018

This was a bit tricky to fix because it is in a place which is rather complicated and needs to be rewritten at some point. But I hope it is working now. Can you double check, @justinclift? Also worth checking how hidden columns work and if it reacts to filter changes in any unexpected way. The reason is that there are plenty of possible actions in the Browse Data tab which trigger all sorts of view changes to be reset and I hope to sort them all out in my commit 😄 It'd also be interesting to see if this has any side effects when using Qt <5.10.

@MKleusberg MKleusberg self-assigned this Aug 10, 2018

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Aug 10, 2018

Just tested it here on a CentOS 7 x64 box, built with the CentOS provided Qt 5.9.2, and the column reset problem is now resolved.

Hidden columns become visible again after sorting though. Doh! 😉

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Aug 10, 2018

Really? Just checked again here and they stayed hidden!? Can you describe in detail or maybe make a short video so we can see if you're triggering any corner case?

@mgrojo

This comment has been minimized.

Copy link
Contributor

mgrojo commented Aug 10, 2018

Still working fine with Qt Version 5.5.1

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Aug 10, 2018

I don't have time to look at this again right now. Maybe tonight though. 😄

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Aug 11, 2018

Got around to making a screencast of the problem:

It's definitely not my imagination. 😄

MKleusberg added a commit that referenced this issue Aug 12, 2018

Fix hidden columns being unhidden in Browse Data tab when sorting
This is required for Qt version < 5.10. For Qt versions >= 5.10 the
unhiding of all columns before rehiding the desired ones does nothing
because there the table view doesn't store its state anymore. And when
it does nothing we don't change the state of our view settings which in
turn triggers the mentioned problem.

See issue #1475.
@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Aug 12, 2018

Turns out it's all more broken than I dared to imagine. I hope it's working now with the latest commit. Can you give it a try? 😄

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Aug 16, 2018

Did you have a chance to test this yet, @justinclift? 😄

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Aug 16, 2018

Whoops. Completely forgot. Will test it now. 😄

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Aug 16, 2018

Yep, the sorting no longer resets column widths and the hidden columns no longer appear afterwards either. They can be made to appear using the correct option in the right click context menu though, so this looks to be fully solved now.

Thanks for getting it done @MKleusberg, and for the reminder prompt. 😉

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Aug 16, 2018

Cool 😄 I feel like that would have been a release blocker too. Thanks for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment