mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 1 forks source link

Fixed matplotlib error by avoiding call to ArtistList #969

Closed GuiMacielPereira closed 6 months ago

GuiMacielPereira commented 6 months ago

Fixed error by deleting line object directly. There is no need to call an ArtistList when can just delete the artist directly.

Description of work: Fixed a bug where removing Bragg peak lines caused an unhanded error. This happened due to matplotib having been updated, and the object ArtistList no longer supporting a remove() method.

To test: Open a slice plot > Information > Bragg peaks > select some bragg peaks Then try to deselect any bragg peak The Bragg peak lines should be removed from the plot.

Fixes #967 .