Skip to content

Commit

Permalink
Fixed default value for inline widgets
Browse files Browse the repository at this point in the history
gui/modules/constant_configuration.py:
 - ConstantWidgetBase:
   Show default value if strVal is empty
   strValue was always set before, which worked in QLineEdit but broke inline widgets
  • Loading branch information
rexissimus committed Oct 1, 2014
1 parent 49404bf commit ccc7dd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vistrails/gui/modules/constant_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ def __init__(self, param):
ConstantWidgetMixin.__init__(self, value)

self.psi = psi
if psi and psi.default:
if psi and psi.default and param.strValue == '':
self.setDefault(psi.default)
self.setContents(param.strValue)
else:
self.setContents(param.strValue)

def setDefault(self, value):
# default to setting the contents silenty
Expand Down

0 comments on commit ccc7dd6

Please sign in to comment.