pywwt icon indicating copy to clipboard operation
pywwt copied to clipboard

Foreground/background properties out of sync when changing modes

Open Carifio24 opened this issue 2 years ago • 2 comments

@pkgw This issue is what we had briefly discussed yesterday. After looking at it again, I do think there's a problem (or at least some unintuitive behavior) here.

The issue is that the foreground and background member values can become out of sync with what's actually shown in the WWT viewer when switching modes. This is a particular problem with sky mode, though I don't think it's fundamentally restricted to that layer.

There's a video below that shows this in action, but the basic steps to reproduce are:

  • Create a WWT viewer (which will be in sky mode by default)
  • Switch the background and/or foreground to be different from the default
  • Switch to another mode
  • Switch back to sky mode

This will bring the viewer back to the default sky mode state, but the foreground and background member values will reflect what was chosen previously. If you want to restore your previous layer settings, you need to switch to something else, and then back to what you want. This is particularly noticeable if a user has a widget like the layer controls open. The reason for this is that the mode switching is internally adjusting WWT's foreground/background, but the Python-side properties don't know about that.

https://user-images.githubusercontent.com/14281631/220662026-56e1ecb3-124a-4d0d-8cb0-90a14f473104.mp4

I think there are probably a few different ways we could handle this, but as long as the Python properties are kept in sync with the WWT state I think it won't be confusing for a user.

Carifio24 avatar Feb 22 '23 22:02 Carifio24