mirror of https://github.com/OpenTTD/OpenTTD
(svn r18612) -Fix [FS#3407]: Buy vehicle window did not properly disable panel drawing while shaded.
parent
91747d72dc
commit
52c7d9897e
|
@ -1119,6 +1119,7 @@ struct BuildVehicleWindow : Window {
|
||||||
|
|
||||||
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++) {
|
||||||
|
@ -1129,12 +1130,13 @@ struct BuildVehicleWindow : Window {
|
||||||
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 OnDoubleClick(Point pt, int widget)
|
virtual void OnDoubleClick(Point pt, int widget)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue