mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +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)
|
void CFsdSetupForm::showEnableInfo(bool visible)
|
||||||
{
|
{
|
||||||
ui->cb_Override->setVisible(visible);
|
m_visibleEnableInfo = visible;
|
||||||
ui->lbl_FsdSetup->setVisible(visible);
|
this->visibleEnableInfo(visible);
|
||||||
ui->pb_SetDefaults->setVisible(visible);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFsdSetupForm::setReadOnly(bool readonly)
|
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_AircraftPartsReceive, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsSend, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_AircraftPartsSend, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionReceive, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionReceive, readonly);
|
||||||
@@ -111,10 +110,13 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
Q_UNUSED(enabled);
|
Q_UNUSED(enabled);
|
||||||
this->setReadOnly(!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()
|
void CFsdSetupForm::resetToDefaultValues()
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace BlackGui
|
|||||||
explicit CFsdSetupForm(QWidget *parent = nullptr);
|
explicit CFsdSetupForm(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
virtual ~CFsdSetupForm();
|
virtual ~CFsdSetupForm() override;
|
||||||
|
|
||||||
//! FSD setup from GUI
|
//! FSD setup from GUI
|
||||||
BlackMisc::Network::CFsdSetup getValue() const;
|
BlackMisc::Network::CFsdSetup getValue() const;
|
||||||
@@ -67,7 +67,11 @@ namespace BlackGui
|
|||||||
//! Enable / disable
|
//! Enable / disable
|
||||||
void enabledToggled(bool enabled);
|
void enabledToggled(bool enabled);
|
||||||
|
|
||||||
|
//! Show / hide visible "enable" info
|
||||||
|
void visibleEnableInfo(bool visible);
|
||||||
|
|
||||||
QScopedPointer<Ui::CFsdSetupForm> ui;
|
QScopedPointer<Ui::CFsdSetupForm> ui;
|
||||||
|
bool m_visibleEnableInfo = true;
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
Reference in New Issue
Block a user