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

Column preferences are not saved #5317

Closed
vaindil opened this issue Aug 22, 2020 · 6 comments · Fixed by #5327
Closed

Column preferences are not saved #5317

vaindil opened this issue Aug 22, 2020 · 6 comments · Fixed by #5327
Assignees
Milestone

Comments

@vaindil
Copy link

vaindil commented Aug 22, 2020

Overview

I don't want to see the attachments column in my database, so I right-click the columns and uncheck the "Has attachments" column. I keep the database window open and scroll down a bit after that, but after 5-10 minutes the window will "reset"--the database scrolls back to the top, and the "Has attachments" column is showing again. I cannot actually get my column preferences to save.

Steps to Reproduce

  1. Change column preferences to hide the "Has attachments" column
  2. Scroll down
  3. Wait 5-10 minutes

Expected Behavior

Nothing should happen, my preferences should be saved and it shouldn't randomly scroll back to the top.

Actual Behavior

My column preferences are not saved and I'm randomly scrolled back to the top.

Context

I'm on 2.6.1, but the problem began with 2.6.0. I was able to change my preferences before 2.6.0 with no problems.

KeePassXC - Version 2.6.1
Revision: 9a35bba

Qt 5.15.0
Debugging mode is disabled.

Operating system: Windows 10 Version 2004
CPU architecture: x86_64
Kernel: winnt 10.0.19041

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey

Cryptographic libraries:
libgcrypt 1.8.5

@vaindil vaindil added the bug label Aug 22, 2020
@droidmonkey
Copy link
Member

Probably related to search field clearing. Are you in the middle of a search when this happens?

@vaindil
Copy link
Author

vaindil commented Aug 23, 2020

The column preference does reset after I reset my current search, but it also happens this way:

  1. Open KeepassXC (it was previously fully closed).
  2. Open database.
  3. Clear "Has attachments" from column preferences.
  4. Quit KeepassXC correctly from the tray icon context menu.

Reopen KeepassXC and the DB, and the column will be back.

@droidmonkey
Copy link
Member

Search columns and normal view columns are different and that behavior is currently by design.

@vaindil
Copy link
Author

vaindil commented Aug 23, 2020

Understandable, but I think the issue is still valid because of my previous comment. No searching was involved.

@droidmonkey
Copy link
Member

Confirmed, the column settings are not saved. Thank you for the report!

@droidmonkey droidmonkey self-assigned this Aug 23, 2020
@droidmonkey droidmonkey added this to the v2.6.2 milestone Aug 23, 2020
@droidmonkey droidmonkey changed the title Column preferences reset after some time Column preferences are not saved Aug 23, 2020
droidmonkey added a commit that referenced this issue Aug 23, 2020
* Work around Qt bug that causes isSectionHidden to return false after restoring state due to the section actually only being set to 0 width.
* Fixes #5317
@droidmonkey
Copy link
Member

Found the bug and fixed it. This was a two-tier problem... we were resetting the size of the paperclip and totp columns everytime a new database tab is opened. This would normally be fine if the hidden state of those columns was preserved. However, there is a Qt bug in saving the header state that only sets the width to 0 and does not preserve the hidden state!

droidmonkey added a commit that referenced this issue Aug 30, 2020
* Work around Qt bug that causes isSectionHidden to return false after restoring state due to the section actually only being set to 0 width.
* Fixes #5317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants