mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
Ref T659, improved handling of override checkbox in FSD details/voice
* the checkbox can be always enabled * or disabled in read only mode
This commit is contained in:
committed by
Mat Sutcliffe
parent
4e9bf35cfc
commit
d546ebdcba
@@ -61,6 +61,16 @@ namespace BlackGui
|
||||
ui->cb_Override->setChecked(enabled);
|
||||
}
|
||||
|
||||
void CVoiceSetupForm::setAlwaysAllowOverride(bool allow)
|
||||
{
|
||||
m_alwaysAllowOverride = allow;
|
||||
if (allow)
|
||||
{
|
||||
ui->cb_Override->setEnabled(true);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_Override, false);
|
||||
}
|
||||
}
|
||||
|
||||
void CVoiceSetupForm::showEnableInfo(bool visible)
|
||||
{
|
||||
m_visibleEnableInfo = visible;
|
||||
@@ -71,10 +81,21 @@ namespace BlackGui
|
||||
{
|
||||
ui->pb_SetDefaults->setEnabled(!readonly);
|
||||
ui->le_VatsimUdpPort->setReadOnly(readonly);
|
||||
CGuiUtility::checkBoxesReadOnly(this, readonly);
|
||||
if (m_alwaysAllowOverride)
|
||||
{
|
||||
ui->cb_Override->setEnabled(true);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_Override, false);
|
||||
}
|
||||
|
||||
/**
|
||||
if (readonly && ui->cb_Override->isChecked())
|
||||
{
|
||||
// this is no value which will be stored
|
||||
ui->cb_Override->setChecked(false);
|
||||
}
|
||||
**/
|
||||
|
||||
this->forceStyleSheetUpdate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user