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