From c2ef54525a449c9ce72b5a3bfc3210f9684c74fb Mon Sep 17 00:00:00 2001 From: PeterN Date: Thu, 21 Sep 2023 07:42:49 +0100 Subject: [PATCH] Fix #11326: Update autoreplace scrollbar count after clearing engine list. (#11327) (cherry picked from commit cef6a5f79c28cee1030c08ec19a87667338ce508) --- src/autoreplace_gui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 7979495d06..1974b92bcf 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -227,6 +227,7 @@ class ReplaceVehicleWindow : public Window { /* Always empty the right engines list when nothing is selected in the left engines list */ this->engines[1].clear(); this->sel_engine[1] = INVALID_ENGINE; + this->vscroll[1]->SetCount(this->engines[1].size()); } else { if (this->reset_sel_engine && this->sel_engine[0] != INVALID_ENGINE) { /* Select the current replacement for sel_engine[0]. */