diff --git a/vnpy/app/cta_strategy/ui/widget.py b/vnpy/app/cta_strategy/ui/widget.py index 2d1b20df..9516b43f 100644 --- a/vnpy/app/cta_strategy/ui/widget.py +++ b/vnpy/app/cta_strategy/ui/widget.py @@ -125,7 +125,7 @@ class CtaManager(QtWidgets.QWidget): def remove_strategy(self, strategy_name): """""" - manager = self.managers[strategy_name] + manager = self.managers.pop(strategy_name) manager.deleteLater() def add_strategy(self):