From 4922c36ada22770f77ff61623c740275ce8ce8f0 Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 18 Nov 2014 19:54:23 -0500 Subject: [PATCH] Prevent farm-plot-select from selecting crops when no crops are listed Fixes #396 --- plugins/tweak/tweaks/farm-plot-select.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tweak/tweaks/farm-plot-select.h b/plugins/tweak/tweaks/farm-plot-select.h index bd4fc5f71..063180c75 100644 --- a/plugins/tweak/tweaks/farm-plot-select.h +++ b/plugins/tweak/tweaks/farm-plot-select.h @@ -55,7 +55,7 @@ struct farm_select_hook : df::viewscreen_dwarfmodest { df::building_farmplotst* farm_plot = getFarmPlot(); if (farm_plot) { - if (input->count(interface_key::SELECT_ALL)) + if (input->count(interface_key::SELECT_ALL) && ui->selected_farm_crops.size() > 0) { int32_t crop_id = getSelectedCropId(); for (int season = 0; season < 4; season++)