From 0ff6f78a6cac1192e21daf4270ee2ed8a8095694 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Tue, 20 Jun 2017 12:10:56 +0200 Subject: [PATCH] [add] parameter localMag added --- pylot/RELEASE-VERSION | 2 +- pylot/core/io/default_parameters.py | 9 +++++++-- pylot/core/util/widgets.py | 2 ++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 85433583..7bb5d74d 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -1b17-dirty +a8544-dirty diff --git a/pylot/core/io/default_parameters.py b/pylot/core/io/default_parameters.py index f304c8e0..1ae7caad 100644 --- a/pylot/core/io/default_parameters.py +++ b/pylot/core/io/default_parameters.py @@ -275,7 +275,11 @@ defaults = {'rootpath': {'type': str, 'wdttolerance': {'type': float, 'tooltip': 'maximum allowed deviation from Wadati-diagram', - 'value': 1.0} + 'value': 1.0}, + + 'localMag': {'type': float, + 'tooltip': 'maximum allowed deviation from Wadati-diagram', + 'value': 1.0} } settings_main={ @@ -297,7 +301,8 @@ settings_main={ 'smoment':[ 'vp', 'rho', - 'Qp'], + 'Qp', + 'localMag'], 'pick':[ 'extent', 'pstart', diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 46984de9..a92a7940 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -2228,6 +2228,8 @@ class AutoPickParaBox(QtGui.QWidget): if type(box) == QtGui.QLineEdit: box.setText(str(value)) elif type(box) == QtGui.QSpinBox or type(box) == QtGui.QDoubleSpinBox: + if not value: + value = 0. box.setValue(value) elif type(box) == QtGui.QCheckBox: if value == 'True':