mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 09:15:38 +03:00
Merge pull request #505 from opentx/dvogonen/companion_splash_problem_504
Fixed #504.
This commit is contained in:
commit
370cec86a9
3 changed files with 18 additions and 11 deletions
|
@ -116,14 +116,15 @@ int main(int argc, char *argv[])
|
|||
current_firmware_variant = GetFirmwareVariant(firmware_id);
|
||||
// qDebug() << current_firmware_variant;
|
||||
|
||||
MainWindow mainWin;
|
||||
|
||||
if (showSplash) {
|
||||
splash->show();
|
||||
splash->showMessage(QObject::tr(""));
|
||||
sleep(SPLASH_TIME);
|
||||
QTimer::singleShot(1000*SPLASH_TIME, splash, SLOT(close()));
|
||||
QTimer::singleShot(1000*SPLASH_TIME, &mainWin, SLOT(show()));
|
||||
}
|
||||
else {
|
||||
mainWin.show();
|
||||
}
|
||||
|
||||
MainWindow mainWin;
|
||||
mainWin.show();
|
||||
splash->finish(&mainWin);
|
||||
return app.exec();
|
||||
}
|
||||
|
|
|
@ -112,9 +112,15 @@ downloadDialog_forWait(NULL)
|
|||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||
setAcceptDrops(true);
|
||||
|
||||
// give time to the main windows to open before starting updates, delay 1s
|
||||
QTimer::singleShot(1000, this, SLOT(doAutoUpdates()));
|
||||
QTimer::singleShot(1000, this, SLOT(displayWarnings()));
|
||||
// give time to the splash to disappear and main window to open before starting updates
|
||||
int updateDelay = 1000;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
bool showSplash = settings.value("show_splash", true).toBool();
|
||||
if (showSplash)
|
||||
updateDelay += (SPLASH_TIME*1000);
|
||||
QTimer::singleShot(updateDelay, this, SLOT(doAutoUpdates()));
|
||||
QTimer::singleShot(updateDelay, this, SLOT(displayWarnings()));
|
||||
|
||||
QStringList strl = QApplication::arguments();
|
||||
QString str;
|
||||
QString printfilename;
|
||||
|
|
|
@ -322,7 +322,7 @@ Gasen reverseras om alternativet väljs. Tomgång ligger då uppåt. Trim och ga
|
|||
<message>
|
||||
<location line="+528"/>
|
||||
<source>Show Splash Screen on Startup</source>
|
||||
<translation>Visa bild vid start av sändare</translation>
|
||||
<translation>Visa Startbild</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+182"/>
|
||||
|
@ -9450,7 +9450,7 @@ Tryck på Avbryt för att avburyta kalibreringen</translation>
|
|||
<message>
|
||||
<location line="-233"/>
|
||||
<source>Show Splash Screen</source>
|
||||
<translation>Visa bild vid start av sändare</translation>
|
||||
<translation>Visa Startbild</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+767"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue