tweak farm-plot-select: Only show controls when plots are fully built

Fixes #521
develop
lethosor 2015-08-10 10:41:47 -04:00
parent fcd15bfd73
commit 9b5f42e3a9
2 changed files with 5 additions and 1 deletions

@ -48,6 +48,7 @@ DFHack Future
- fixed a crash on arena load
- number keys (e.g. 2/8) take priority over cursor keys when applicable
tweak fps-min fixed
tweak farm-plot-select: Stopped controls from appearing when plots weren't fully built
workflow: Fixed some issues with stuck jobs
- Note: Existing stuck jobs must be cancelled and re-added
zone: Fixed a crash when using "zone set" (and a few other potential crashes)

@ -76,7 +76,10 @@ struct farm_select_hook : df::viewscreen_dwarfmodest {
DEFINE_VMETHOD_INTERPOSE(void, render, ())
{
INTERPOSE_NEXT(render)();
if (!getFarmPlot() || !ui->selected_farm_crops.size())
auto farm_plot = getFarmPlot();
if (!farm_plot || !ui->selected_farm_crops.size())
return;
if (farm_plot->getBuildStage() != farm_plot->getMaxBuildStage())
return;
auto dims = Gui::getDwarfmodeViewDims();
int x = dims.menu_x1 + 1,