Commit 5d181cf2 authored by Valentin Valls's avatar Valentin Valls
Browse files

Handle ROIs in copy config

parent 6fdbf411
......@@ -705,13 +705,12 @@ def copyItemsFromChannelNames(
def copyItemConfig(sourceItem: plot_model.Item, destinationItem: plot_model.Item):
"""Copy the configuration and the item tree from a source item to a
destination item"""
if not isinstance(sourceItem, plot_item_model.CurveItem):
raise TypeError("Only available for curve item. Found %s" % type(sourceItem))
if not isinstance(destinationItem, type(sourceItem)):
raise TypeError(
"Both items must have the same type. Found %s" % type(destinationItem)
if isinstance(sourceItem, plot_item_model.CurveItem):
sourceToDest = {}
......@@ -726,6 +725,10 @@ def copyItemConfig(sourceItem: plot_model.Item, destinationItem: plot_model.Item
sourceToDest[item] = newItem
elif isinstance(sourceItem, plot_item_model.RoiItem):
raise TypeError("Only available for curve item. Found %s" % type(sourceItem))
def updateXAxis(
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment