-
-
Notifications
You must be signed in to change notification settings - Fork 820
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
Make some landscape variables static, and properties of LandscapeMgr #3951
base: master
Are you sure you want to change the base?
Conversation
- also movable label angle - also user-configurable polygon color - rearrange GUI
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
Hello @gzotti! Thank you for the suggested improvement. |
If you want the variables to be shared between |
One of the two. Having them in Landscape spares us from using them as explicit arguments. We use a similar pattern in Nebula(Mgr) and Satellite(s). Apart from not needing to declare friend, is there any problem, performance or whatever-wise? |
I expected them to be made properties or simply gettable data members, not be passed around as arguments.
Having such state static and belonging to Landscape seems architecturally wrong. We have a class that manages landscapes, yet we store landscapes-global state in static members of Landscape class. |
Either a Landscape can use its static (class) variable, or it must get a LandscapeMgr property from a Module it first has to grab (or has to keep as own variable). The LandscapeMgr IMO can have privileged (friend) access to the Landscape class, so I prefer this model. The Mgr class is between user/GUI and the managed objects, and it is the Mgr's properties which are synchronized in RemoteSync. See the previous solution: LandscapeMgr sets current landscape's instance variables, and when switching landscapes, we have to take the variable value from the current landscape and place it in the next landscape's instance variable. I see no real benefit, just a chance to forget one on the next extension. What I intend to change here?
|
Description
PeakFinder can export a rich landscape gazetteer for Stellarium now, and labels may overlap.
This branch is intended to bring tilted labels, and maybe some other improvements.
It occurred to me that some variables should actually static and can be set as properties of LandscapeMgr. A few more are yet to be changed!
Fixes # (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: