Fractional inch setting now disabled when not in Imperial building

This commit is contained in:
hokieengr
2018-09-15 18:46:48 -04:00
committed by wmayer
parent 77060a75a6
commit 92145e7e37

View File

@@ -52,6 +52,16 @@ DlgSettingsUnitsImp::DlgSettingsUnitsImp(QWidget* parent)
//fillUpListBox();
ui->tableWidget->setVisible(false);
//
// Enable/disable the fractional inch option depending on system
if( UnitsApi::getSchema() == ImperialBuilding )
{
ui->comboBox_FracInch->setEnabled(true);
}
else
{
ui->comboBox_FracInch->setEnabled(false);
}
}
/**
@@ -70,10 +80,15 @@ void DlgSettingsUnitsImp::on_comboBox_ViewSystem_currentIndexChanged(int index)
UnitsApi::setSchema((UnitSystem)index);
std::cout << "Hello! " << index << std::endl;
// box name:
// comboBox_FracInch and enabled
// Enable/disable the fractional inch option depending on system
if( (UnitSystem)index == ImperialBuilding )
{
ui->comboBox_FracInch->setEnabled(true);
}
else
{
ui->comboBox_FracInch->setEnabled(false);
}
}
void DlgSettingsUnitsImp::saveSettings()