Skip to content

Commit af53230

Browse files
Mola19CalcProgrammer1
authored andcommitted
Disable "Apply All Devices" button, if mode is not a custom mode
1 parent 16b5768 commit af53230

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qt/OpenRGBDevicePage/OpenRGBDevicePage.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
114114
updateColorUi();
115115

116116
ui->ApplyColorsButton->setDisabled(autoUpdateEnabled());
117+
ui->SetAllButton->setDisabled(device->modes[0].name != "Direct" && device->modes[0].name != "Custom" && device->modes[0].name != "Static");
117118
}
118119

119120
OpenRGBDevicePage::~OpenRGBDevicePage()
@@ -680,7 +681,7 @@ void Ui::OpenRGBDevicePage::on_LEDBox_currentIndexChanged(int index)
680681

681682
}
682683

683-
void Ui::OpenRGBDevicePage::on_ModeBox_currentIndexChanged(int /*index*/)
684+
void Ui::OpenRGBDevicePage::on_ModeBox_currentIndexChanged(int index)
684685
{
685686
/*-----------------------------------------------------*\
686687
| Update mode user interface elements |
@@ -696,6 +697,8 @@ void Ui::OpenRGBDevicePage::on_ModeBox_currentIndexChanged(int /*index*/)
696697
| Disable the button if we can safely auto apply colors |
697698
\*-----------------------------------------------------*/
698699
ui->ApplyColorsButton->setDisabled(autoUpdateEnabled());
700+
ui->SetAllButton->setDisabled(device->modes[index].name != "Direct" && device->modes[index].name != "Custom" && device->modes[index].name != "Static");
701+
699702
}
700703

701704
void Ui::OpenRGBDevicePage::on_PerLEDCheck_clicked()

0 commit comments

Comments
 (0)