mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Hide the led view to prevent a paint event on rescan #1871
This commit is contained in:
@@ -1729,8 +1729,29 @@ void OpenRGBDialog2::SaveProfileAs()
|
||||
|
||||
void Ui::OpenRGBDialog2::on_ButtonRescan_clicked()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Hide devices view on rescan so it stops handling paint |
|
||||
| events. |
|
||||
\*---------------------------------------------------------*/
|
||||
for(int device = 0; device < ui->DevicesTabBar->count(); device++)
|
||||
{
|
||||
OpenRGBDevicePage* device_page = qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device));
|
||||
if(device_page) // Check the cast to make sure it is a device and not plugin
|
||||
{
|
||||
device_page->HideDeviceView();
|
||||
}
|
||||
}
|
||||
|
||||
device_view_showing = false;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Show the detection progress bar. |
|
||||
\*---------------------------------------------------------*/
|
||||
SetDetectionViewState(true);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Show the detection progress bar. |
|
||||
\*---------------------------------------------------------*/
|
||||
ResourceManager::get()->DetectDevices();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user