-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
Fix issue #1842 #2043
Fix issue #1842 #2043
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
Can you describe in which way you feel the logic is "the wrong way around"? |
The action at this point is going from "orbit display object only" to "orbit display all objects". So for all objects to show the orbit setFlagOrbits() should be set true (switch it on). But false was here meaning "switch them off" which isn't the desired behaviour. |
Ah, indeed there is something odd here. But now I can select Venus and click "only orbit for major planets", and see all orbits. When I deselect Venus the other orbits vanish as intended by the checkboxes. I am not completely sure when to display the orbit system of planet moons. When I select Jupiter and "show orbit for selected object only", should its moon system "blossom up" as well? Or, when I select Io, show really just Io's orbit or those of all other moons? Or single moon orbit plus parent orbit? There are lots of possibilities here. @alex-w ? |
Indeed it was something of a struggle that I initially expected to be straightforward. There are just 2 or 3 checkboxes in play (4 or 8 outcomes). However, the current state is also an input and there are variations (for example moons) that complicate it. @gzotti if it's ok with you I think I'd like to replace the complex set of nested "if/else" structures with a strategy pattern that should be simpler to follow (as a human). If you agree that's the way forward I'd be happy to look at that and we can suspend this PR for the time being? |
Yes, please give this a try and if you want rewrite the method, as long as the result does what it should do, and the code becomes at least not worse. I usually write comments while thinking through the logic, before I fill in the actual code. No need to suspend the PR, just continue on this branch and keep pushing. When it works as we all find perfect, we merge the branch. |
I was just reading the guide to try and determine what the expected behaviour should be and I see that the checkboxes here are not described in the guide (but there are references to the flags in the configuration appendix). So, I will work based on what I understand today but this may well lead to some questions here to clarify the exact expected behaviour so we can reach that goal. I'll start on it later this evening, I'm at my day job at the moment ;) |
The button tooltips should explain the intentions. Not every minuscule detail is therefore explained in the Guide, but thanks for looking up :-). Sure, take your time, the next release is >4 weeks in the future. |
Yeah, I'm running into confusion understanding the requirements. I tried to "build my own" based on how I think it should work and pretty much failed. Here's why:-
There is essentially nothing in the checkbox descriptions, tooltips, or Stellarium Guide about moons of major planets. So figuring out when a moon's orbit should be shown is not obvious. We have three checkboxes:-
Now "Show orbits" (a) just switches them all on or off. That leaves two checkboxes where we can just draw up a basic truth table:-
So, at this point, I can implement the above truth table (where moons can be seen if selected but not its parent or siblings). But I actually think I need a lead here from @alex-w or @gzotti on the requirements and expectations. I could make it up myself but I have learnt that making assumptions about other peoples expectations is not the best way forward. My gut feeling is that an extra checkbox is needed to describe the expected behaviour of the moons etc. But that's starting to get a bit much (3 checkboxes is eight combinations). Thoughts/comments? |
The point is the difference between selection and the checkboxes, so there are indeed 8 cases (apart from the Orbits general switch) (b) Only orbits of major planets My personal understanding when "limited" to the current 2 detailing checkboxes and "selected" item
The case 110 implies showing nothing, but maybe it is better to have the major planet orbits. |
Sorry for late answer. When I've added new options to this feature (orbit rendering) then I tried saving the strong backward compatibility to behaviour of orbits. Probably the time to changes the behaviour of orbits and logic of the tool is coming. So, I think existed feature and requests should be revised and, maybe, reimplemented or just documented (in the SUG and GUI) current behaviour with fixes. |
I think we have seen the current logic is incomplete or even buggy. I have described above what I would see as most comprehensive and useful. Of course YMMV, so we can discuss other interpretations/drafts. |
* Add another option and StelApp method to allow storing config items immediately - the intention is to start using this for storing detail settings without having to do the global store. * Fix the botched logic of storing details for the orbit drawing (Fix #1842) - This has been attempted also in #2043, but I think this is more comprehensive. - In addition, immediate-mode storage has been added to the Orbit details. - In addition, a bug about storing line width has been fixed. * Add option to add or exclude moon orbits for planets/selected objects * SUG: Add new details
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This has finally been superseded and solved by #3348. Thanks for discussing! |
Description
The change is to invert the logic calling setFlagOrbits() which seemed to be the wrong way around.
Fixes #1842
Screenshots (if appropriate):
n/a
Type of change
How Has This Been Tested?
Tested on Windows 10 Visual Studio before and after the change.
Test Configuration:
Checklist: