From e7f552844bc41f327658b853e949494f44de5621 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 6 Nov 2020 18:22:05 +0000 Subject: [PATCH] Unselect selected plan when closing plan window --- src/plans_gui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plans_gui.cpp b/src/plans_gui.cpp index 36ae269687..5e58df2866 100644 --- a/src/plans_gui.cpp +++ b/src/plans_gui.cpp @@ -97,7 +97,10 @@ struct PlansWindow : Window { ~PlansWindow() { this->list.clear(); - _current_plan = nullptr; + if (_current_plan) { + _current_plan->SetFocus(false); + _current_plan = nullptr; + } } virtual void OnClick(Point pt, int widget, int click_count)