def DeleteCurrentItem(cls): """ Delete currently active item, be it a plot set or a curve. @return (True, plot_sed_id) if a plot set was deleted or (False, curve_id) if a curve was deleted, or (True, -1) if nothing was deleted. """ c_id = cls.GetCurrentCurveID() ps_id = cls.GetCurrentPlotSetID() ret = True, -1 if ps_id == -1: Logger.Info( "PlotController.DeleteCurrentItem(): nothing selected, nothing to delete!" ) return True, -1 # Do we delete a curve or a full plot set if c_id == -1: cls.DeletePlotSet(ps_id) ret = True, ps_id else: cls.DeleteCurve(c_id) ret = False, c_id return ret