mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Setup form fix, do not hide "override" bar if "override" flag changes
This commit is contained in:
@@ -76,15 +76,14 @@ namespace BlackGui
|
||||
|
||||
void CFsdSetupForm::showEnableInfo(bool visible)
|
||||
{
|
||||
ui->cb_Override->setVisible(visible);
|
||||
ui->lbl_FsdSetup->setVisible(visible);
|
||||
ui->pb_SetDefaults->setVisible(visible);
|
||||
m_visibleEnableInfo = visible;
|
||||
this->visibleEnableInfo(visible);
|
||||
}
|
||||
|
||||
void CFsdSetupForm::setReadOnly(bool readonly)
|
||||
{
|
||||
this->showEnableInfo(!readonly);
|
||||
ui->le_TextCodec->setReadOnly(!readonly);
|
||||
ui->le_TextCodec->setReadOnly(readonly);
|
||||
ui->pb_SetDefaults->setEnabled(!readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsReceive, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsSend, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionReceive, readonly);
|
||||
@@ -111,10 +110,13 @@ namespace BlackGui
|
||||
{
|
||||
Q_UNUSED(enabled);
|
||||
this->setReadOnly(!enabled);
|
||||
if (!enabled)
|
||||
{
|
||||
this->setValue(CFsdSetup());
|
||||
}
|
||||
}
|
||||
|
||||
void CFsdSetupForm::visibleEnableInfo(bool visible)
|
||||
{
|
||||
ui->cb_Override->setVisible(visible);
|
||||
ui->lbl_FsdSetup->setVisible(visible);
|
||||
ui->pb_SetDefaults->setVisible(visible);
|
||||
}
|
||||
|
||||
void CFsdSetupForm::resetToDefaultValues()
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BlackGui
|
||||
explicit CFsdSetupForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Constructor
|
||||
virtual ~CFsdSetupForm();
|
||||
virtual ~CFsdSetupForm() override;
|
||||
|
||||
//! FSD setup from GUI
|
||||
BlackMisc::Network::CFsdSetup getValue() const;
|
||||
@@ -67,7 +67,11 @@ namespace BlackGui
|
||||
//! Enable / disable
|
||||
void enabledToggled(bool enabled);
|
||||
|
||||
//! Show / hide visible "enable" info
|
||||
void visibleEnableInfo(bool visible);
|
||||
|
||||
QScopedPointer<Ui::CFsdSetupForm> ui;
|
||||
bool m_visibleEnableInfo = true;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user