GUI: Don't try drawing widgets with an empty bounding rectangle

Fixes the dropdown buttons being incorrectly drawn in the keymaps
dialog with the classic theme when scrolled down.
This commit is contained in:
Bastien Bouclet 2020-02-19 20:07:12 +01:00 committed by Filippos Karapetis
parent 9475192e81
commit aaa71d53b2

View File

@ -876,6 +876,11 @@ void ThemeEngine::drawDD(DrawData type, const Common::Rect &r, uint32 dynamic, b
extendedRect.clip(_clip);
}
// Cull the elements not in the clip rect
if (extendedRect.isEmpty()) {
return;
}
if (forceRestore || drawData->_layer == kDrawLayerBackground)
restoreBackground(extendedRect);