Fix road/rail station building buttons malfunction when switching from other tool

This commit is contained in:
dP
2025-12-14 16:16:29 +05:00
parent d8a07b6ea2
commit 0586e48c3b
2 changed files with 2 additions and 5 deletions

View File

@@ -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

View File

@@ -570,7 +570,6 @@ struct BuildRoadToolbarWindow : Window {
}
citymania::RoadToolbar_UpdateOptionWidgetStatus(this, widget, _remove_button_clicked, RoadTypeIsRoad(this->roadtype));
//this->UpdateOptionWidgetStatus((RoadToolbarWidgets)widget);
// if (citymania::_remove_mod) RoadToolbar_CtrlChanged(this);
}
EventState OnHotkey(int hotkey) override