Skip to content

AvaPlot crashes when focused second time #5105

@nbeck-SMT

Description

@nbeck-SMT

Issue: When an AvaPlot element is focused for the second time, Avalonia crashes with the following message:

InvalidOperationException: The control Border already has a visual parent AdornerLayer while trying to add it as a child of AdornerLayer.

ScottPlot Version: 5.0.56

Code Sample:

Simply take one of the Avalonia examples, e.g. Avalonia MultiThreading and hit the tab key repeatedly. When AvaPlot loses focus, the focus adorner doesn't disappear. When it should be focused again, Avalonia crashes.

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