- in legacy graphic engine, fixed issue with Delete shortcut key trying to delete twice

This commit is contained in:
Marius Stanciu
2019-09-23 17:52:34 +03:00
committed by Marius
parent ae7fec6dd1
commit b5e9997713
4 changed files with 23 additions and 2 deletions

View File

@@ -476,6 +476,18 @@ class PlotCanvasLegacy(QtCore.QObject):
return self.figure.add_axes([0.05, 0.05, 0.9, 0.9], label=name)
def remove_current_axes(self):
"""
:return: The name of the deleted axes
"""
axes_to_remove = self.figure.axes.gca()
current_axes_name = deepcopy(axes_to_remove._label)
self.figure.axes.remove(axes_to_remove)
return current_axes_name
def on_scroll(self, event):
"""
Scroll event handler.