mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-19 03:56:26 -04:00
Ensure Device View updates when segments are configured
This commit is contained in:
@@ -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 |
|
||||
\*-----------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user