Fix double-clicking a .aseprite file in macOS Finder doesn't open the file anymore (fix #2985)

More info in: #3006
This commit is contained in:
Gaspar Capello 2021-10-15 23:29:09 -03:00 committed by David Capello
parent ea703a38e6
commit f15589734f

View File

@ -325,17 +325,15 @@ int App::initialize(const AppOptions& options)
// Show the main window (this is not modal, the code continues) // Show the main window (this is not modal, the code continues)
m_mainWindow->openWindow(); m_mainWindow->openWindow();
// Redraw the whole screen. // To know the initial manager size we call to
manager->invalidate(); // Manager::updateAllDisplaysWithNewScale(...) so we receive a
// Manager::onNewDisplayConfiguration() (which will update the
// Pump some messages so we receive the first // bounds of the manager for first time). This is required so if
// Manager::onNewDisplayConfiguration() and we known the manager // the OpenFileCommand (called when we're processing the CLI with
// initial size. This is required so if the OpenFileCommand // OpenBatchOfFiles) shows a dialog to open a sequence of files,
// (called when we're processing the CLI with OpenBatchOfFiles) // the dialog is centered correctly to the manager bounds.
// shows a dialog to open a sequence of files, the dialog is const int scale = Preferences::instance().general.screenScale();
// centered correctly to the manager bounds. manager->updateAllDisplaysWithNewScale(scale);
ui::MessageLoop loop(manager);
loop.pumpMessages();
} }
#endif // ENABLE_UI #endif // ENABLE_UI