Hide the led view to prevent a paint event on rescan #1871
This commit is contained in:
parent
05d4f8e7a8
commit
fe51cc7c5d
1 changed files with 21 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue