Delay for correct the first fitbest zoom.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-01-08 13:08:54 +02:00
parent 45454a8955
commit 39e7b2df89
2 changed files with 9 additions and 3 deletions

View File

@ -61,7 +61,15 @@ int main(int argc, char *argv[])
#endif // !defined(Q_OS_MAC)
app.setMainWindow(&w);
QTimer::singleShot(0, &w, SLOT(ProcessCMD()));
int msec = 0;
//Before we load pattern show window.
if (VApplication::IsGUIMode())
{
w.show();
msec = 15; // set delay for correct the first fitbest zoom
}
QTimer::singleShot(msec, &w, SLOT(ProcessCMD()));
return app.exec();
}

View File

@ -4024,10 +4024,8 @@ void MainWindow::ProcessCMD()
const VCommandLinePtr cmd = qApp->CommandLine();
auto args = cmd->OptInputFileNames();
//Before we load pattern show window.
if (VApplication::IsGUIMode())
{
show();
ReopenFilesAfterCrash(args);
}
else