Clean up dead code in OpenRGBDevicePage
This commit is contained in:
@@ -1724,109 +1724,6 @@ void OpenRGBDevicePage::UpdateModeUi()
|
||||
}
|
||||
|
||||
ui->SetAllButton->setDisabled((selected_mode_string != "Direct") && (selected_mode_string != "Custom") && (selected_mode_string != "Static"));
|
||||
|
||||
#if 0
|
||||
/*-----------------------------------------------------*\
|
||||
| Fill in the zone box based on color mode |
|
||||
\*-----------------------------------------------------*/
|
||||
switch(color_mode)
|
||||
{
|
||||
case MODE_COLORS_NONE:
|
||||
case MODE_COLORS_RANDOM:
|
||||
ui->ZoneBox->blockSignals(true);
|
||||
ui->ZoneBox->clear();
|
||||
ui->ZoneBox->blockSignals(false);
|
||||
|
||||
ui->LEDBox->blockSignals(true);
|
||||
ui->LEDBox->clear();
|
||||
ui->LEDBox->blockSignals(false);
|
||||
|
||||
ui->EditButton->setEnabled(false);
|
||||
ui->ApplyColorsButton->setEnabled(false);
|
||||
break;
|
||||
|
||||
case MODE_COLORS_PER_LED:
|
||||
ui->ZoneBox->blockSignals(true);
|
||||
ui->ZoneBox->clear();
|
||||
|
||||
if(device->GetZoneCount() > 1)
|
||||
{
|
||||
ui->ZoneBox->addItem(tr("All Zones"));
|
||||
}
|
||||
|
||||
for(unsigned int zone_idx = 0; zone_idx < device->GetZoneCount(); zone_idx++)
|
||||
{
|
||||
ui->ZoneBox->addItem(device->GetZoneDisplayName((unsigned int)zone_idx).c_str());
|
||||
|
||||
for(unsigned int segment_idx = 0; segment_idx < device->GetZoneSegmentCount(zone_idx); segment_idx++)
|
||||
{
|
||||
if(device->GetZoneSegmentFlags(zone_idx, segment_idx) & SEGMENT_FLAG_GROUP_MEMBER)
|
||||
{
|
||||
ui->ZoneBox->addItem((" " + device->GetZoneSegmentName(zone_idx, segment_idx)).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->ZoneBox->addItem((" " + device->GetZoneSegmentName(zone_idx, segment_idx)).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ui->ZoneBox->setCurrentIndex(0);
|
||||
ui->ZoneBox->blockSignals(false);
|
||||
ui->ApplyColorsButton->setEnabled(true);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Update LED box |
|
||||
\*-----------------------------------------------------*/
|
||||
on_ZoneBox_currentIndexChanged(0);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Update color picker with color of first LED |
|
||||
\*-----------------------------------------------------*/
|
||||
//on_LEDBox_currentIndexChanged(0);
|
||||
break;
|
||||
|
||||
case MODE_COLORS_MODE_SPECIFIC:
|
||||
ui->ZoneBox->blockSignals(true);
|
||||
ui->ZoneBox->clear();
|
||||
ui->ZoneBox->addItem(tr("Mode Specific"));
|
||||
ui->ZoneBox->blockSignals(false);
|
||||
|
||||
int led_index = ui->LEDBox->currentIndex();
|
||||
|
||||
ui->LEDBox->blockSignals(true);
|
||||
ui->LEDBox->clear();
|
||||
|
||||
if(device->GetModeColorsMin(selected_mode) == device->GetModeColorsMax(selected_mode))
|
||||
{
|
||||
ui->EditButton->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->EditButton->setEnabled(true);
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i < device->GetModeColorsCount(selected_mode); i++)
|
||||
{
|
||||
char id_buf[32];
|
||||
// TODO: translate
|
||||
snprintf(id_buf, 32, "Mode Color %u", i);
|
||||
ui->LEDBox->addItem(id_buf);
|
||||
}
|
||||
|
||||
if(led_index >= ui->LEDBox->count())
|
||||
{
|
||||
led_index = 0;
|
||||
}
|
||||
|
||||
ui->LEDBox->setCurrentIndex(led_index);
|
||||
on_LEDBox_currentIndexChanged(led_index);
|
||||
ui->LEDBox->setEnabled(true);
|
||||
ui->LEDBox->blockSignals(false);
|
||||
ui->ApplyColorsButton->setEnabled(true);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void OpenRGBDevicePage::UpdateZoneList()
|
||||
|
||||
Reference in New Issue
Block a user