Fix road/rail station building buttons malfunction when switching from other tool
This commit is contained in:
@@ -2893,8 +2893,6 @@ bool HandlePlacePushButton(Window *w, WidgetID widget, up<Tool> tool) {
|
||||
return false;
|
||||
}
|
||||
|
||||
w->LowerWidget(widget);
|
||||
|
||||
auto icon = tool->GetCursor();
|
||||
if ((icon & ANIMCURSOR_FLAG) != 0) {
|
||||
SetAnimatedMouseCursor(_animcursors[icon & ~ANIMCURSOR_FLAG]);
|
||||
@@ -2904,9 +2902,9 @@ bool HandlePlacePushButton(Window *w, WidgetID widget, up<Tool> tool) {
|
||||
citymania::SetActiveTool(std::move(tool));
|
||||
_thd.window_class = w->window_class;
|
||||
_thd.window_number = w->window_number;
|
||||
w->LowerWidget(widget);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
} // namespace citymania
|
||||
|
||||
@@ -569,8 +569,7 @@ struct BuildRoadToolbarWindow : Window {
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
citymania::RoadToolbar_UpdateOptionWidgetStatus(this, widget, _remove_button_clicked, RoadTypeIsRoad(this->roadtype));
|
||||
// this->UpdateOptionWidgetStatus((RoadToolbarWidgets)widget);
|
||||
// if (citymania::_remove_mod) RoadToolbar_CtrlChanged(this);
|
||||
//this->UpdateOptionWidgetStatus((RoadToolbarWidgets)widget);
|
||||
}
|
||||
|
||||
EventState OnHotkey(int hotkey) override
|
||||
|
||||
Reference in New Issue
Block a user