Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.76k stars 821 forks source link

astrocal: custom shortcut can lead to crash #1293

Closed axd1967 closed 4 years ago

axd1967 commented 4 years ago

The implementation of #1165 is problematic.

First, it doesn't make much sense to define a global shortcut for e.g. "Calculate ephemeris" as these will not change (because the parameters are fixed in the Astrocalc GUI).

Maybe it makes sense in a scenario where the user plays with the time dialog and then recomputes ephemerides - on the condition that the dialog is dynamic (somehow tracks the current time).

Better was to provide "local" shortcuts such as seen in e.g. the confirmation dialog.

image

Also, a new bug has appeared now: after assigning a global shortcut and restarting , the app crashes when invoking the custom shortcut. This is possibly related to the fact that the astrocalc parameters are not correctly initialised because the dialog has not yet been called.

alex-w commented 4 years ago

Alex, please do it yourself with handling priorities, support of the various languages and handling collisions.

axd1967 commented 4 years ago

@alex-w about the underscores ("&amp"): (https://github.com/Stellarium/stellarium/commit/b7f5cce86d48584c2892e022d37bf2eb3a45e92c#diff-314069835c04f431bf69bb7bc57388af) removed those - apparently they didn't work? but that's precisely what was needed for #1165. but indeed, the underscores did not appear in 0.20.2, maybe Qt needed just some extra configuration to enable this? it's a basic GUI mechanism that is probably well supported in Qt.

alex-w commented 4 years ago

Please check version 0.20.3-975ac97479: https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot