Merge pull request #2047 from brentru/fix-terminalio-clearing

Fix Terminal's Tilegrid not Clearing
This commit is contained in:
Scott Shawcroft 2019-08-12 16:00:43 -07:00 committed by GitHub
commit 49cb72d585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,12 @@ void common_hal_terminalio_terminal_construct(terminalio_terminal_obj_t *self, d
self->tilegrid = tilegrid;
self->first_row = 0;
for (uint16_t x = 0; x < self->tilegrid->width_in_tiles; x++) {
for (uint16_t y = 0; y < self->tilegrid->height_in_tiles; y++) {
common_hal_displayio_tilegrid_set_tile(self->tilegrid, x, y, 0);
}
}
common_hal_displayio_tilegrid_set_top_left(self->tilegrid, 0, 1);
}