From 39e7b2df89300251ab548285dc6ba3a43a6d02e2 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 8 Jan 2016 13:08:54 +0200 Subject: [PATCH] Delay for correct the first fitbest zoom. --HG-- branch : develop --- src/app/valentina/main.cpp | 10 +++++++++- src/app/valentina/mainwindow.cpp | 2 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/valentina/main.cpp b/src/app/valentina/main.cpp index 35c429c19..bdc2b26d0 100644 --- a/src/app/valentina/main.cpp +++ b/src/app/valentina/main.cpp @@ -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(); } diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 76fe05e13..3545d8bce 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -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