WorldWideTelescope / wwt-windows-client

WorldWide Telescope Windows Application
Other
179 stars 55 forks source link

Fix issue with time offset at non-unit clock rates and update speed text with shortcuts #217

Closed Carifio24 closed 6 months ago

Carifio24 commented 6 months ago

This is the companion to https://github.com/WorldWideTelescope/wwt-webgl-engine/pull/302. See that PR and https://github.com/WorldWideTelescope/wwt-webgl-engine/issues/301 for a discussion of the issue with time rates. The SpaceTimeController in the Windows client has the same logic, and thus the fix is the same.

The Windows client seemed to already be aware of this issue in some sense, as the condition for displaying the "Reverse Time" text checked that the rate was -2 rather than the expected -1.

In the course of checking that the Windows client also had this issue (and testing my fix), I realized that the speed text doesn't currently update when time is changed using the F/S shortcut keys - obviously this is not great, since then the view tab is giving wrong information. Hence this PR also adds a small bit of code to update the speed text when the shortcuts are used.