Skip to content

Explain why Delete/Remove are disabled for the active database - #1082

Merged
AgreeDK merged 2 commits into
OpenSAK-Org:betafrom
nagisml:fix/db-delete-tooltip
Oct 19, 2026
Merged

AgreeDK merged 2 commits into
OpenSAK-Org:betafrom
nagisml:fix/db-delete-tooltip

Conversation

@nagisml

@nagisml nagisml commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

A newly created database becomes the active one right away, so "Delete permanently…" is disabled for it. The red stylesheet also overrode Qt's greyed disabled text, so the button looked clickable but did nothing. Add a tooltip pointing the user to switch databases first, and only apply the red colour when the button is enabled.

Closes #1081

A newly created database becomes the active one right away, so
"Delete permanently…" is disabled for it. The red stylesheet also
overrode Qt's greyed disabled text, so the button looked clickable
but did nothing. Add a tooltip pointing the user to switch databases
first, and only apply the red colour when the button is enabled.
@AgreeDK

AgreeDK commented Oct 18, 2026

Copy link
Copy Markdown
Member

Thanks @nagisml — small, clear fix. Scoping the red colour to QPushButton:enabled is the right way to stop it overriding Qt's greyed-out disabled text, and the tooltip finally tells the user why nothing happens.

Optional, not blocking: Delete is also disabled when the database file is missing on disk, and that case still has no tooltip. Could be a follow-up.

Tests pass locally. Approving.

@nagisml

nagisml commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

@AgreeDK thanks for the review. missing on disk is fine to be added as I judge the risk as low I've included it in that PR

@AgreeDK
AgreeDK merged commit a34a007 into OpenSAK-Org:beta Oct 19, 2026
7 checks passed
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