mirror of https://github.com/OpenTTD/OpenTTD
(svn r19187) -Fix [FS#3634]: the vehicle info in the autoreplace gui was drawn even when the window was shaded
parent
04087c1bf0
commit
e6e2e8b473
|
@ -382,6 +382,7 @@ public:
|
||||||
|
|
||||||
this->DrawWidgets();
|
this->DrawWidgets();
|
||||||
|
|
||||||
|
if (!this->IsShaded()) {
|
||||||
int needed_height = this->details_height;
|
int needed_height = this->details_height;
|
||||||
/* Draw details panels. */
|
/* Draw details panels. */
|
||||||
for (int side = 0; side < 2; side++) {
|
for (int side = 0; side < 2; side++) {
|
||||||
|
@ -392,12 +393,13 @@ public:
|
||||||
needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
|
needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!this->IsShaded() && needed_height != this->details_height) { // Details window are not high enough, enlarge them.
|
if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
|
||||||
this->details_height = needed_height;
|
this->details_height = needed_height;
|
||||||
this->ReInit();
|
this->ReInit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual void OnClick(Point pt, int widget, int click_count)
|
virtual void OnClick(Point pt, int widget, int click_count)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue