mirror of https://github.com/OpenTTD/OpenTTD
(svn r2373) - CodeChange: don't redraw the window upon a user-based dirty request if the requested widget is invisible or otherwise not visible (type WWT_EMPTY)
parent
426aa514ff
commit
df4c22e358
12
window.c
12
window.c
|
@ -1541,13 +1541,11 @@ void InvalidateWindow(byte cls, WindowNumber number)
|
||||||
void InvalidateWidget(Window *w, byte widget_index)
|
void InvalidateWidget(Window *w, byte widget_index)
|
||||||
{
|
{
|
||||||
const Widget *wi = &w->widget[widget_index];
|
const Widget *wi = &w->widget[widget_index];
|
||||||
// if (wi->left != -2) {
|
|
||||||
SetDirtyBlocks(
|
/* Don't redraw the window if the widget is invisible or of no-type */
|
||||||
w->left + wi->left,
|
if (wi->type == WWT_EMPTY || HASBIT(w->hidden_state, widget_index)) return;
|
||||||
w->top + wi->top,
|
|
||||||
w->left + wi->right + 1,
|
SetDirtyBlocks(w->left + wi->left, w->top + wi->top, w->left + wi->right + 1, w->top + wi->bottom + 1);
|
||||||
w->top + wi->bottom + 1);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index)
|
void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index)
|
||||||
|
|
Loading…
Reference in New Issue