diff --git a/pyqtgraph/parametertree/parameterTypes.py b/pyqtgraph/parametertree/parameterTypes.py index 7742357f..40262078 100644 --- a/pyqtgraph/parametertree/parameterTypes.py +++ b/pyqtgraph/parametertree/parameterTypes.py @@ -429,11 +429,11 @@ class GroupParameterItem(ParameterItem): tw = self.treeWidget() if tw is None: return - tw.setFirstItemColumnSpanned(self, True) + self.setFirstColumnSpanned(True) if self.addItem is not None: tw.setItemWidget(self.addItem, 0, self.addWidgetBox) - tw.setFirstItemColumnSpanned(self.addItem, True) - + self.addItem.setFirstColumnSpanned(True) + def addChild(self, child): ## make sure added childs are actually inserted before add btn if self.addItem is not None: ParameterItem.insertChild(self, self.childCount()-1, child) @@ -609,7 +609,7 @@ class ActionParameterItem(ParameterItem): if tree is None: return - tree.setFirstItemColumnSpanned(self, True) + self.setFirstColumnSpanned(True) tree.setItemWidget(self, 0, self.layoutWidget) def titleChanged(self): @@ -646,7 +646,7 @@ class TextParameterItem(WidgetParameterItem): if tw is None: return - tw.setFirstItemColumnSpanned(self.subItem, True) + self.subItem.setFirstColumnSpanned(True) tw.setItemWidget(self.subItem, 0, self.textBox) # for now, these are copied from ParameterItem.treeWidgetChanged diff --git a/pyqtgraph/widgets/DataTreeWidget.py b/pyqtgraph/widgets/DataTreeWidget.py index edcfd427..ad9bf49a 100644 --- a/pyqtgraph/widgets/DataTreeWidget.py +++ b/pyqtgraph/widgets/DataTreeWidget.py @@ -65,7 +65,7 @@ class DataTreeWidget(QtGui.QTreeWidget): subnode = QtGui.QTreeWidgetItem(["", "", ""]) node.addChild(subnode) self.setItemWidget(subnode, 0, widget) - self.setFirstItemColumnSpanned(subnode, True) + subnode.setFirstColumnSpanned(True) # recurse to children for key, data in childs.items():