Check for size changes and refresh data if size has changed

This commit is contained in:
Adam Honse 2020-08-20 16:56:28 -05:00
parent b0b46dd3a5
commit f750654b3e

View file

@ -390,6 +390,14 @@ void DeviceView::paintEvent(QPaintEvent* /* event */)
QPainter painter(this);
QFont font = painter.font();
/*-----------------------------------------------------*\
| If controller has resized, reinitialize local data |
\*-----------------------------------------------------*/
if(controller->leds.size() != led_pos.size())
{
setController(controller);
}
/*-----------------------------------------------------*\
| LED rectangles |
\*-----------------------------------------------------*/