HeliosVirtualCockpit / Helios

Helios Distribution
https://github.com/HeliosVirtualCockpit/Helios/wiki
GNU General Public License v3.0
202 stars 33 forks source link

moving or rotating panels that contain simulator viewports does not update UI #434

Open derammo opened 3 years ago

derammo commented 3 years ago

If a SimulatorViewport is contained within a panel, then rotating or moving those panels does not notify the viewport that it is effectively moved in screen coordinates.

As a result, the UI will not automatically update the configuration status and the user has to hit "Reload Status" in the Interface Status view to get the correct UI state.

developer notes: This limitation is very expensive to fix, because the shadow visuals mechanism would have to track all ancestry of any viewports.

derammo commented 2 years ago

For more developer context:

The shadow visuals mechanism maintains a second tree linked to selected nodes in the profile. For all monitors and visuals that represent viewports, there is a shadow object. Shadow objects are signed up for notifications on any movement or addition/deletion of nodes they are attached to. In this way, an implementation specific (Monitor Setup, Falcon viewports, ...) node can be dynamically updated as the user moves around things in the Profile. That's why Monitor Setup is able to show the red rectangles slide around dynamically and immediately know when the monitor setup file is out of date because someone moved something.

However, in order to keep the complexity to a reasonable level, it does not track every item in the profile. It probably could, but it does not. That's why, if you move a node that is a panel ancestor of a viewport but not the monitor itself, it does not notice. This wasn't a problem for existing profiles, because viewports are usually placed at the root.

578 is caused by introducing components that include viewports. These are effectively panel templates mentioned in #283.