Viewport: Fix viewport updates being applied to shaded windows

pull/138/head
Jonathan G Rennison 4 years ago
parent c5c24a3165
commit 0a6a38886d

@ -1559,7 +1559,7 @@ void DrawDirtyBlocks()
w->flags &= ~WF_WIDGETS_DIRTY;
}
if (w->viewport != nullptr) {
if (w->viewport != nullptr && !w->IsShaded()) {
ViewPort *vp = w->viewport;
if (vp->is_drawn) {
vp->ClearDirty();

@ -2002,8 +2002,8 @@ void NWidgetViewport::UpdateViewportCoordinates(Window *w)
if (vp != nullptr) {
vp->left = w->left + this->pos_x;
vp->top = w->top + this->pos_y;
vp->width = this->current_x;
vp->height = this->current_y;
vp->width = w->IsShaded() ? 0 : this->current_x;
vp->height = w->IsShaded() ? 0 : this->current_y;
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);

Loading…
Cancel
Save