Skip to content

Legend is visible after a Detach Legend has been closed #1804

@BambOoxX

Description

@BambOoxX

Hello, @swharden, I jsut stumbled upon a bug remaining from the 4.1.33 -> 4.1.34 modifications.

In 4.1.33, when a detached legend is closed, no legend appears in the plotting area. In 4.1.34 it's the opposite. I am sure it makes sense for most people to have it this way, but in my case, it' absolutely the contrary ^^ (I have very long legend lists that do not fit in the plotting are).

The behavior is handled in

private void OnClosed(object sender, EventArgs e)
{
RemoveHighlightFromAllPlottables();
Legend.IsDetached = false;
FormsPlot.Plot.Legend(enable: true, location: null);
FormsPlot.Refresh();
}

where obviously, the former state of the legend prior to the detach is forgotten, and a visible legend is enforced.

I am not totally sure how we should proceed to sotre the forme visibility state of the Legend. Would you have an idea ?

Cheer !

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions