Closed martinvandriel closed 9 years ago
An ugly way would be to set some instance attribute when the database is loaded. Pseudocode:
if db.radius <= 5000:
self.is_mars = True
else:
self.is_mars = False
and then just do an if/else in the map rendering code.
We need to rewrite large part of the GUI in any case if we want to extend it with support to plot multiple databases at once in any case. So for now don't worry and just hack it in I guess.
Hmm, at the stage of plotting the map, the DB is not yet opened
You'll have to redraw the map upon loading a DB. I think initially plotting earth is fine. Calling plot_map()
again should be fine. You need to clear the axis within plot_map()
.
Another thing: Do we need the higher resolution textures? Altogether they are almost 10 MB and we can never get rid of them in the repository again if we merge this...
Can you remove the last commit and only commit the low resolution one?
I did not get the thing with clearing the axis working. seem to work without, but I guess you where worried about memory leaks?
I was more worried about what happens with the old axes; not really sure what happens with it in the way you implemented it right now. But I just tested it on my machine and it seems to work so definitely good enough for now.
Even if the old axis stick around; as long as people don't change the DB hundreds of times without restarting the GUI we have no memory problem I think.
is there a good way to have a switch for this?