Check for size changes and refresh data if size has changed
This commit is contained in:
parent
b0b46dd3a5
commit
f750654b3e
1 changed files with 8 additions and 0 deletions
|
|
@ -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 |
|
||||
\*-----------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue