Ensure Device View updates when segments are configured
This commit is contained in:
parent
a36162a971
commit
2ec4183789
2 changed files with 23 additions and 0 deletions
|
|
@ -724,6 +724,24 @@ void DeviceView::paintEvent(QPaintEvent* /* event */)
|
|||
InitDeviceView();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| If segments have resized, reinitialize local data |
|
||||
\*-----------------------------------------------------*/
|
||||
unsigned int segments = 0;
|
||||
|
||||
for(std::size_t zone_idx = 0; zone_idx < controller->zones.size(); zone_idx++)
|
||||
{
|
||||
for(std::size_t segment_idx = 0; segment_idx < controller->zones[zone_idx].segments.size(); segment_idx++)
|
||||
{
|
||||
segments++;
|
||||
}
|
||||
}
|
||||
|
||||
if(segments != segment_pos.size())
|
||||
{
|
||||
InitDeviceView();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| LED rectangles |
|
||||
\*-----------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -1615,6 +1615,11 @@ void Ui::OpenRGBDevicePage::on_EditZoneButton_clicked()
|
|||
\*-----------------------------------------------------*/
|
||||
UpdateModeUi();
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Update interface to update Device View |
|
||||
\*-----------------------------------------------------*/
|
||||
UpdateInterface();
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Update LED box |
|
||||
\*-----------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue