Hide WidgetParameterItem.defaultBtn if param has no default (#1411)

Co-authored-by: Daniel Lidstrom <dlidstrom@russelltech.com>
This commit is contained in:
lidstrom83 2020-10-22 08:28:03 -07:00 committed by GitHub
parent 1b89c47cc2
commit cff19f3271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,7 @@ class WidgetParameterItem(ParameterItem):
self.defaultBtn.setEnabled(not self.param.valueIsDefault() and self.param.writable())
# hide / show
self.defaultBtn.setVisible(not self.param.readonly())
self.defaultBtn.setVisible(self.param.hasDefault() and not self.param.readonly())
def updateDisplayLabel(self, value=None):
"""Update the display label to reflect the value of the parameter."""