Allow default button for text and colormap parameters
This commit is contained in:
parent
edf42114f8
commit
db43c9447c
@ -63,8 +63,9 @@ class WidgetParameterItem(ParameterItem):
|
|||||||
layout = QtGui.QHBoxLayout()
|
layout = QtGui.QHBoxLayout()
|
||||||
layout.setContentsMargins(0, 0, 0, 0)
|
layout.setContentsMargins(0, 0, 0, 0)
|
||||||
layout.setSpacing(2)
|
layout.setSpacing(2)
|
||||||
layout.addWidget(w)
|
layout.addWidget(w, 1)
|
||||||
layout.addWidget(self.displayLabel)
|
layout.addWidget(self.displayLabel, 1)
|
||||||
|
layout.addStretch(0)
|
||||||
layout.addWidget(self.defaultBtn)
|
layout.addWidget(self.defaultBtn)
|
||||||
self.layoutWidget = QtGui.QWidget()
|
self.layoutWidget = QtGui.QWidget()
|
||||||
self.layoutWidget.setLayout(layout)
|
self.layoutWidget.setLayout(layout)
|
||||||
@ -279,10 +280,9 @@ class WidgetParameterItem(ParameterItem):
|
|||||||
if self.asSubItem:
|
if self.asSubItem:
|
||||||
tree.setFirstItemColumnSpanned(self.subItem, True)
|
tree.setFirstItemColumnSpanned(self.subItem, True)
|
||||||
tree.setItemWidget(self.subItem, 0, self.widget)
|
tree.setItemWidget(self.subItem, 0, self.widget)
|
||||||
else:
|
tree.setItemWidget(self, 1, self.layoutWidget)
|
||||||
tree.setItemWidget(self, 1, self.layoutWidget)
|
self.displayLabel.hide()
|
||||||
self.displayLabel.hide()
|
self.selected(False)
|
||||||
self.selected(False)
|
|
||||||
|
|
||||||
def defaultClicked(self):
|
def defaultClicked(self):
|
||||||
self.param.setToDefault()
|
self.param.setToDefault()
|
||||||
|
Loading…
Reference in New Issue
Block a user