mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
OP-1628 Handling dialog 'modality' and z-order in a less bad but still bad way.
This commit is contained in:
parent
bd1f40da1f
commit
514d38216b
@ -98,17 +98,17 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp
|
||||
{
|
||||
switch (selectedType) {
|
||||
case VehicleConfigurationSource::INPUT_PWM:
|
||||
return data.RM_RcvrPort != HwSettings::CC_RCVRPORT_PWM;
|
||||
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM;
|
||||
|
||||
case VehicleConfigurationSource::INPUT_PPM:
|
||||
return data.RM_RcvrPort != HwSettings::CC_RCVRPORT_PPM;
|
||||
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM;
|
||||
|
||||
case VehicleConfigurationSource::INPUT_SBUS:
|
||||
return data.RM_MainPort != HwSettings::CC_MAINPORT_SBUS;
|
||||
return data.RM_MainPort != HwSettings::RM_MAINPORT_SBUS;
|
||||
|
||||
case VehicleConfigurationSource::INPUT_DSM:
|
||||
// TODO: Handle all of the DSM types ?? Which is most common?
|
||||
return data.RM_MainPort != HwSettings::CC_MAINPORT_DSM;
|
||||
return data.RM_MainPort != HwSettings::RM_MAINPORT_DSM;
|
||||
|
||||
default: return true;
|
||||
}
|
||||
|
@ -497,11 +497,18 @@ void SetupWizard::pageChanged(int currId)
|
||||
|
||||
void SetupWizard::reboot() const
|
||||
{
|
||||
SetupWizard *wiz = const_cast<SetupWizard *>(this);
|
||||
wiz->setWindowFlags(wiz->windowFlags() & ~Qt::WindowStaysOnTopHint);
|
||||
|
||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||
Q_ASSERT(pm);
|
||||
UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>();
|
||||
Q_ASSERT(uploader);
|
||||
uploader->reboot();
|
||||
|
||||
wiz->setRestartNeeded(false);
|
||||
wiz->setWindowFlags(wiz->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
wiz->show();
|
||||
}
|
||||
|
||||
bool SetupWizard::saveHardwareSettings() const
|
||||
|
@ -32,6 +32,8 @@ RebootDialog::RebootDialog(UploaderGadgetWidget *uploader) :
|
||||
QDialog(uploader),
|
||||
ui(new Ui::RebootDialog), m_uploader(uploader)
|
||||
{
|
||||
setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint)
|
||||
& ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint));
|
||||
ui->setupUi(this);
|
||||
connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot()));
|
||||
ui->rebootProgressBar->setVisible(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user