This PR aims to fix an issue where changes to the layer color in a tour are not persistent within the tour - whenever a user does something else in the tour editor (e.g., moves to another slide), the layer color reverts back to what it was originally.
The source of this problem is the tour's LayerInfo object for the layer in question not being updated to match the layer itself. To fix this, this PR adds additional functionality to the callback triggered when the color is changed via the color picker in the layer manager. The new piece of code checks whether there is a current tour, and if so, whether the given layer is visible on the current tour stop. If it is, the FrameParams, StartParams, and EndParams for the current tour stop are updated to match the color. I don't see anywhere else in the UI that a user can change a layer color (and I didn't want to put this code in the setter for the layer's Color attribute).
Additionally, this PR fixed an integer vs. floating-point division issue that occurs when getting LayerInfo params for a layer, which currently causes every RGBA value obtained in this way to be either 0 or 255.
@pkgw It turns out the layer ID issue that we had talked about isn't an issue at all - not because of any Guid black magic, but because of the assignment here.
This PR aims to fix an issue where changes to the layer color in a tour are not persistent within the tour - whenever a user does something else in the tour editor (e.g., moves to another slide), the layer color reverts back to what it was originally.
The source of this problem is the tour's
LayerInfo
object for the layer in question not being updated to match the layer itself. To fix this, this PR adds additional functionality to the callback triggered when the color is changed via the color picker in the layer manager. The new piece of code checks whether there is a current tour, and if so, whether the given layer is visible on the current tour stop. If it is, theFrameParams
,StartParams
, andEndParams
for the current tour stop are updated to match the color. I don't see anywhere else in the UI that a user can change a layer color (and I didn't want to put this code in the setter for the layer'sColor
attribute).Additionally, this PR fixed an integer vs. floating-point division issue that occurs when getting
LayerInfo
params for a layer, which currently causes every RGBA value obtained in this way to be either 0 or 255.@pkgw It turns out the layer ID issue that we had talked about isn't an issue at all - not because of any Guid black magic, but because of the assignment here.