diff options
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r-- | src/newgrf_gui.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index c9ac27f3c..5319b1c3f 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -749,6 +749,7 @@ struct NewGRFWindow : public Window { this->sel = newsel; this->preset = -1; this->InvalidateData(); + this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window break; } @@ -791,6 +792,8 @@ struct NewGRFWindow : public Window { uint i = (pt.y - this->GetWidget<NWidgetBase>(SNGRFS_FILE_LIST)->pos_y) / this->resize.step_height + this->vscroll.GetPosition(); for (c = this->list; c != NULL && i > 0; c = c->next, i--) {} + + if (this->sel != c) this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window this->sel = c; this->InvalidateData(); |