From b5b06351ac85aa999ab8b926437c29a561057f7b Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 14 Jan 2016 19:12:54 +0000 Subject: [PATCH] Tracerestrict: Fix GUI issue with picker button raise/lower states. When a picker button was selected, clicking on a different picker button would cause both buttons to be raised, instead of just the previous. --- src/tracerestrict_gui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tracerestrict_gui.cpp b/src/tracerestrict_gui.cpp index 22c7f5471f..5811e52afb 100644 --- a/src/tracerestrict_gui.cpp +++ b/src/tracerestrict_gui.cpp @@ -1645,6 +1645,9 @@ private: */ void SetObjectToPlaceAction(int widget, CursorID cursor) { + if (this->current_placement_widget != -1 && widget != this->current_placement_widget) { + ResetObjectToPlace(); + } this->ToggleWidgetLoweredState(widget); this->SetWidgetDirty(widget); if (this->IsWidgetLowered(widget)) {