mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +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) {
|
switch (selectedType) {
|
||||||
case VehicleConfigurationSource::INPUT_PWM:
|
case VehicleConfigurationSource::INPUT_PWM:
|
||||||
return data.RM_RcvrPort != HwSettings::CC_RCVRPORT_PWM;
|
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM;
|
||||||
|
|
||||||
case VehicleConfigurationSource::INPUT_PPM:
|
case VehicleConfigurationSource::INPUT_PPM:
|
||||||
return data.RM_RcvrPort != HwSettings::CC_RCVRPORT_PPM;
|
return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM;
|
||||||
|
|
||||||
case VehicleConfigurationSource::INPUT_SBUS:
|
case VehicleConfigurationSource::INPUT_SBUS:
|
||||||
return data.RM_MainPort != HwSettings::CC_MAINPORT_SBUS;
|
return data.RM_MainPort != HwSettings::RM_MAINPORT_SBUS;
|
||||||
|
|
||||||
case VehicleConfigurationSource::INPUT_DSM:
|
case VehicleConfigurationSource::INPUT_DSM:
|
||||||
// TODO: Handle all of the DSM types ?? Which is most common?
|
// 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;
|
default: return true;
|
||||||
}
|
}
|
||||||
|
@ -497,11 +497,18 @@ void SetupWizard::pageChanged(int currId)
|
|||||||
|
|
||||||
void SetupWizard::reboot() const
|
void SetupWizard::reboot() const
|
||||||
{
|
{
|
||||||
|
SetupWizard *wiz = const_cast<SetupWizard *>(this);
|
||||||
|
wiz->setWindowFlags(wiz->windowFlags() & ~Qt::WindowStaysOnTopHint);
|
||||||
|
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
Q_ASSERT(pm);
|
Q_ASSERT(pm);
|
||||||
UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>();
|
UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>();
|
||||||
Q_ASSERT(uploader);
|
Q_ASSERT(uploader);
|
||||||
uploader->reboot();
|
uploader->reboot();
|
||||||
|
|
||||||
|
wiz->setRestartNeeded(false);
|
||||||
|
wiz->setWindowFlags(wiz->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
wiz->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SetupWizard::saveHardwareSettings() const
|
bool SetupWizard::saveHardwareSettings() const
|
||||||
|
@ -32,6 +32,8 @@ RebootDialog::RebootDialog(UploaderGadgetWidget *uploader) :
|
|||||||
QDialog(uploader),
|
QDialog(uploader),
|
||||||
ui(new Ui::RebootDialog), m_uploader(uploader)
|
ui(new Ui::RebootDialog), m_uploader(uploader)
|
||||||
{
|
{
|
||||||
|
setWindowFlags(((windowFlags() | Qt::CustomizeWindowHint)
|
||||||
|
& ~Qt::WindowCloseButtonHint & ~Qt::WindowMinMaxButtonsHint));
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot()));
|
connect(this, SIGNAL(reboot()), m_uploader, SLOT(systemReboot()));
|
||||||
ui->rebootProgressBar->setVisible(true);
|
ui->rebootProgressBar->setVisible(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user