Skip to content

Wrong ChoiceSet listeners being called when queueing PresentChoiceSetOperations #473

@renonick87

Description

@renonick87

Bug Report

If multiple PresentChoiceSetOperations are queued with the ChoiceSetManager, then the listeners from later ChoiceSets can end up being called on earlier ChoiceSets. This is likely because the operation class is using a reference to the manager's current pending ChoiceSet instead of cloning the data.

Reproduction Steps
  1. Present a ChoiceSet with the manager and while it's being presented, queue another ChoiceSet to be presented. Provide an onChoiceSelected listener for both.
  2. In the HMI, select one of the available choices from the first ChoiceSet.
Expected Behavior

The listener for the first ChoiceSet is called.

Observed Behavior

The listener for the second ChoiceSet is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions