mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #768, fixed model form selectOnly, also hide drop area when read only
Reported during #780 by RW
This commit is contained in:
@@ -161,6 +161,7 @@ namespace BlackGui
|
||||
|
||||
ui->cb_Wtc->setEnabled(!readOnly);
|
||||
ui->cb_Rank->setEnabled(!readOnly);
|
||||
ui->drop_DropData->setVisible(!readOnly);
|
||||
ui->combined_TypeSelector->setReadOnly(readOnly);
|
||||
}
|
||||
|
||||
@@ -168,6 +169,7 @@ namespace BlackGui
|
||||
{
|
||||
this->setReadOnly(true);
|
||||
ui->aircraft_Selector->setReadOnly(false);
|
||||
ui->drop_DropData->setVisible(true);
|
||||
}
|
||||
|
||||
void CAircraftIcaoForm::clear()
|
||||
|
||||
@@ -34,6 +34,13 @@ namespace BlackGui
|
||||
ui->editor_Livery->setReadOnly(readOnly);
|
||||
}
|
||||
|
||||
void CAircraftModelForm::setSelectOnly()
|
||||
{
|
||||
ui->editor_AircraftIcao->setSelectOnly();
|
||||
ui->editor_Distributor->setSelectOnly();
|
||||
ui->editor_Livery->setSelectOnly();
|
||||
}
|
||||
|
||||
CStatusMessageList CAircraftModelForm::validate(bool withNestedForms) const
|
||||
{
|
||||
CStatusMessageList msgs;
|
||||
|
||||
@@ -37,9 +37,12 @@ namespace BlackGui
|
||||
//! Allow to drop data
|
||||
void allowDrop(bool allowDrop);
|
||||
|
||||
//! Set as read only
|
||||
//! \copydoc BlackGui::Editors::CForm::setReadOnly
|
||||
virtual void setReadOnly(bool readOnly) override;
|
||||
|
||||
//! \copydoc BlackGui::Editors::CForm::setSelectOnly
|
||||
virtual void setSelectOnly() override;
|
||||
|
||||
//! \copydoc BlackGui::Editors::CForm::validate
|
||||
virtual BlackMisc::CStatusMessageList validate(bool withNestedForms = true) const override;
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ namespace BlackGui
|
||||
ui->selector_AirlineName->setReadOnly(readOnly);
|
||||
ui->le_TelephonyDesignator->setReadOnly(readOnly);
|
||||
ui->country_Selector->setReadOnly(readOnly);
|
||||
ui->drop_DropData->setVisible(!readOnly);
|
||||
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_Va, readOnly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_Military, readOnly);
|
||||
@@ -128,6 +129,7 @@ namespace BlackGui
|
||||
this->setReadOnly(true);
|
||||
ui->selector_AirlineDesignator->setReadOnly(false);
|
||||
ui->selector_AirlineName->setReadOnly(false);
|
||||
ui->drop_DropData->setVisible(true);
|
||||
}
|
||||
|
||||
void CAirlineIcaoForm::clear()
|
||||
|
||||
@@ -101,12 +101,14 @@ namespace BlackGui
|
||||
ui->le_Alias2->setReadOnly(readOnly);
|
||||
ui->le_Description->setReadOnly(readOnly);
|
||||
ui->distributor_Selector->setReadOnly(readOnly);
|
||||
ui->drop_DropData->setVisible(!readOnly);
|
||||
}
|
||||
|
||||
void CDistributorForm::setSelectOnly()
|
||||
{
|
||||
this->setReadOnly(true);
|
||||
ui->distributor_Selector->setReadOnly(false);
|
||||
ui->drop_DropData->setVisible(true);
|
||||
}
|
||||
|
||||
void CDistributorForm::clear()
|
||||
|
||||
@@ -156,6 +156,7 @@ namespace BlackGui
|
||||
ui->editor_AirlineIcao->setReadOnly(readOnly);
|
||||
ui->pb_SearchColor->setVisible(!readOnly);
|
||||
ui->pb_TempLivery->setVisible(!readOnly);
|
||||
ui->drop_DropData->setVisible(!readOnly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_Military, readOnly);
|
||||
}
|
||||
|
||||
@@ -164,6 +165,7 @@ namespace BlackGui
|
||||
this->setReadOnly(true);
|
||||
ui->comp_LiverySelector->setReadOnly(false);
|
||||
ui->editor_AirlineIcao->setSelectOnly();
|
||||
ui->drop_DropData->setVisible(true);
|
||||
}
|
||||
|
||||
void CLiveryForm::clear()
|
||||
|
||||
Reference in New Issue
Block a user