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
Implement dive-invalid flag. Needs some UI work and fine-tuning. #2440
Conversation
Sorry for the color-explosion-banner. I just scrolled through the tag-list and checked everything that applies. 😛 |
I think this should best be looked at by someone who actually expressed interest in this. I always found this a very strange concept. |
I'll ask on the mailing list. If there is no interest, we can also remove the stub and the obscure preferences entry. Fine with me. |
Implement reading/writing the flag from/to XML/git. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Rebased on master - that was somewhat painful with all the prefs churn. On the mailing list, there were two or three positive, though not ecstatic, comments and no negatives. In a quick test, the main problem was that if a dive is selected you don't see whether it is invalid or not. So this would need some UI work. Also it is unclear if "invalid" dives should be considered by the planner to calculate remaining gas load, or whatever magic it does. :-P In any case, I'd really like to come to a decision here. I'd prefer to not have to rebase again. |
Update: Make the font italicized for invalid dives. Looks absolutely horrid, but at least one now recognized invalid dives when selected. The best I can come up with (apart from writing a custom "delegate", which I really don't feel like doing). |
I am hoping to find time to play with this today... sorry to not have provided feedback earlier. |
OK, played with this. |
New attempt: use struck out font instead of italics - I think that's universally understood as "invalid". |
Looked at your new UI approach. Definitely better. That is indeed intuitive. Now we need to implement something similar for the mobile UI - but that's not required to merge this part, I guess. Oh - my mobile build is broken with this branch - but it seems to work on GitHub Actions, so I'm guessing it's something that I borked here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I almost clicked merge, then I noticed that the commit message of 0d45e5c may need some work :-)
static QFont struckOutFont() | ||
{ | ||
QFont font; | ||
font.setStrikeOut(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good choice - but doesn't match the commit message :-)
Connect command to context menu. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Hide invalid dives if prefs.display_invalid_dives is false. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Mark invalid dives in the dive list by striking them out and rendering them with a grey color. The color-change is not sufficient, because the default model delegate ignores color hints if the item is selected. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
If the dive the user clicked on is invalid show an option to make the dive valid. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The user had to restart the application or manually change the filter if they changed the flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Adding dives uses the number of the last dive to create a new dive number. Ignore invalid dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
for some reason I no longer get notifications when you push things... |
Describe the pull request:
Pull request long description:
This implements the "mark dive invalid" feature that has been requested a few times.
This implements the core code. However, the UI code is only a proof of concept: Invalid dives, if shown, are marked by a gray background. This is unfortunate as this is not visible when selected. I'd ask someone else to do the UI part, if there is interest.
The invalid flag is considered for the statistics and when calculating a new dive number. This probably needs some fine-tuning. For example, what about residual N2 in the planner?
Changes made:
Related issues:
This feature was suggested as a potential solution for #2154.
Additional information:
Release note:
Let's wait for approval / refinement.
Documentation change:
Should be done, yes.
Mentions:
@dirkhh @willemferguson @atdotde