From c282ab13f9cbfe35b309b00ddf55fff47f43a07b Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 7 Mar 2019 13:51:51 +0800 Subject: [PATCH] [Fix]Close #1427 --- vnpy/app/cta_strategy/ui/widget.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vnpy/app/cta_strategy/ui/widget.py b/vnpy/app/cta_strategy/ui/widget.py index 9516b43f..303ba910 100644 --- a/vnpy/app/cta_strategy/ui/widget.py +++ b/vnpy/app/cta_strategy/ui/widget.py @@ -450,7 +450,16 @@ class SettingEditor(QtWidgets.QDialog): for name, tp in self.edits.items(): edit, type_ = tp - value = type_(edit.text()) + value_text = edit.text() + + if type_ == bool: + if value_text == "True": + value = True + else: + value = False + else: + value = type_(value_text) + setting[name] = value return setting