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

Added hide selected columns and show all columns to tableview context… #1135

Merged
merged 1 commit into from Sep 18, 2017

Conversation

Projects
None yet
3 participants
@peteristhegreat
Copy link
Contributor

peteristhegreat commented Sep 12, 2017

… menu.

Added a fix for building with MingW on Windows.

Added hide selected columns and show all columns to tableview context…
… menu.

Added a fix for building with MingW on Windows.

@peteristhegreat peteristhegreat referenced this pull request Sep 12, 2017

Closed

Hide columns #1026

4 of 13 tasks complete
@justinclift

This comment has been minimized.

Copy link
Member

justinclift commented Sep 12, 2017

Thanks @peteristhegreat, that's excellent. 😄

@MKleusberg will probably review this tomorrow, and if it's in good shape (which it seems like from eyeballing it just now), then merge it in.

@MKleusberg
Copy link
Member

MKleusberg left a comment

Thank you very much, @peteristhegreat 😄 This is already looking pretty good, I've just found these two minor things.

@@ -9,6 +9,9 @@
*/

#include <antlr/config.hpp>
#ifdef __MINGW32__
#include <cstring>
#endif

This comment has been minimized.

@MKleusberg

MKleusberg Sep 13, 2017

Member

Can you move this into a separate commit because it isn't directly linked to the hide column feature?

This comment has been minimized.

@peteristhegreat

peteristhegreat Sep 13, 2017

Author Contributor

When I pulled the project on Windows 10 to build it, I had issues with strcpy, and in the build order, this was the first header that complained about strcpy_s issues. I agree that it could be put in as a separate issue or commit. The commit string does mention it, on the second line.

{
ui->dataTable->showColumn(1);
ui->dataTable->resizeColumnToContents(1);
}

This comment has been minimized.

@MKleusberg

MKleusberg Sep 13, 2017

Member

Can you add an entry to struct BrowseDataTableSettings in MainWindow.h for saving the hidden flag of each column? It would more or less need to be implemented and used like the columnWidths member.

This would make the hidden columns stay hidden when changing to another table and coming back to the original table later. It would also save the hidden columns in the project files.

If you're unsure about this, that's no problem either. We can just merge the commit then and I'll add this later 😄

This comment has been minimized.

@peteristhegreat

peteristhegreat Sep 13, 2017

Author Contributor

If you could add it in later, that would be great!

I don't think I can really dig into the full column-width persistence in the near future.

Just FYI about that usage... I know that when you say showColumn() in Qt 4, QTableView doesn't respect previous column sizes for all but the most recently hidden column. Any after the first column that have been hidden, get a width of zero. It took me a while to figure that one out... this post on stackoverflow that helped point out the issue for me. https://stackoverflow.com/a/7595202/999943

This comment has been minimized.

@MKleusberg

MKleusberg Sep 18, 2017

Member

Cool, thanks for the information 👍 That would have taken me some time as well 😉

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Sep 18, 2017

No problem 😄 I'll just add the persistence bit later then. Thanks again for your PR, @peteristhegreat! If you ever feel like opening another one you're very welcome to do so 😄

@MKleusberg MKleusberg merged commit c5c3d23 into sqlitebrowser:master Sep 18, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment