-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
BUGunexpected behaviorunexpected behavior
Description
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
ScottPlot/src/ScottPlot4/ScottPlot.WinForms/FormsPlotLegendViewer.cs
Lines 30 to 36 in f012da1
| 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 !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BUGunexpected behaviorunexpected behavior