Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/cargomonitor.cpp # src/core/CMakeLists.txt # src/economy.cpp # src/landscape.cpp # src/linkgraph/flowmapper.cpp # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/linkgraphschedule.cpp # src/misc_gui.cpp # src/newgrf_generic.cpp # src/newgrf_storage.cpp # src/rail_gui.cpp # src/saveload/afterload.cpp # src/saveload/station_sl.cpp # src/script/script_gui.cpp # src/station_cmd.cpp # src/station_gui.cpp # src/string_func.h # src/terraform_cmd.cpp
This commit is contained in:
@@ -217,8 +217,8 @@ int Window::GetRowFromWidget(int clickpos, int widget, int padding, int line_hei
|
||||
{
|
||||
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(widget);
|
||||
if (line_height < 0) line_height = wid->resize_y;
|
||||
if (clickpos < (int)wid->pos_y + padding) return INT_MAX;
|
||||
return (clickpos - (int)wid->pos_y - padding) / line_height;
|
||||
if (clickpos < wid->pos_y + padding) return INT_MAX;
|
||||
return (clickpos - wid->pos_y - padding) / line_height;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -758,7 +758,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count)
|
||||
case WWT_RESIZEBOX:
|
||||
/* When the resize widget is on the left size of the window
|
||||
* we assume that that button is used to resize to the left. */
|
||||
StartWindowSizing(w, (int)nw->pos_x < (w->width / 2));
|
||||
StartWindowSizing(w, nw->pos_x < (w->width / 2));
|
||||
nw->SetDirty(w);
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user