Set custom mode when applying color to all devices

This commit is contained in:
Adam Honse
2020-01-25 17:09:56 -06:00
parent d7740c2d28
commit e8e9a1e7e5
3 changed files with 9 additions and 0 deletions

View File

@@ -385,6 +385,13 @@ void Ui::OpenRGBDevicePage::SetDevice(unsigned char red, unsigned char green, un
on_SetDeviceButton_clicked();
}
void Ui::OpenRGBDevicePage::SetCustomMode()
{
device->SetCustomMode();
ui->ModeBox->setCurrentIndex(0);//device->active_mode);
UpdateModeUi();
}
void Ui::OpenRGBDevicePage::on_SetDeviceButton_clicked()
{
/*-----------------------------------------------------*\

View File

@@ -19,6 +19,7 @@ public:
~OpenRGBDevicePage();
void SetDevice(unsigned char red, unsigned char green, unsigned char blue);
void SetCustomMode();
void UpdateMode();
void UpdateModeUi();

View File

@@ -261,6 +261,7 @@ void OpenRGBDialog2::on_SetAllDevices(unsigned char red, unsigned char green, un
{
for(int device = 0; device < ui->DevicesTabBar->count(); device++)
{
qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->SetCustomMode();
qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->SetDevice(red, green, blue);
}
}