Fix #11326: Update autoreplace scrollbar count after clearing engine list. (#11327)

pull/615/head
PeterN 8 months ago committed by GitHub
parent 6b7537646d
commit cef6a5f79c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -229,6 +229,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]. */

Loading…
Cancel
Save