diff --git a/pyqtgraph/dockarea/Container.py b/pyqtgraph/dockarea/Container.py index 277375f3..c3225edf 100644 --- a/pyqtgraph/dockarea/Container.py +++ b/pyqtgraph/dockarea/Container.py @@ -22,6 +22,9 @@ class Container(object): return None def insert(self, new, pos=None, neighbor=None): + # remove from existing parent first + new.setParent(None) + if not isinstance(new, list): new = [new] if neighbor is None: