Skip to content

Commit c87646a

Browse files
committedOct 13, 2015
[processing] fixed modeler calcualtor when opening dialog for the first time
fixes #13587
1 parent ca27277 commit c87646a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎python/plugins/processing/modeler/CalculatorModelerAlgorithm.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ def setupUi(self):
101101
self.formulaText = QLineEdit()
102102
if hasattr(self.formulaText, 'setPlaceholderText'):
103103
self.formulaText.setPlaceholderText(self.tr('[Enter your formula here]', 'CalculatorModelerParametersDialog'))
104-
alg = self.model.algs[self._algName]
105-
self.formulaText.setText(alg.params[FORMULA])
104+
if self._algName is not None:
105+
alg = self.model.algs[self._algName]
106+
self.formulaText.setText(alg.params[FORMULA])
106107
self.setWindowTitle(self.tr('Calculator', 'CalculatorModelerParametersDialog'))
107108
self.verticalLayout = QVBoxLayout()
108109
self.verticalLayout.setSpacing(2)

0 commit comments

Comments
 (0)
Please sign in to comment.