mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
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:
parent
ea703a38e6
commit
f15589734f
@ -325,17 +325,15 @@ int App::initialize(const AppOptions& options)
|
||||
// Show the main window (this is not modal, the code continues)
|
||||
m_mainWindow->openWindow();
|
||||
|
||||
// Redraw the whole screen.
|
||||
manager->invalidate();
|
||||
|
||||
// Pump some messages so we receive the first
|
||||
// Manager::onNewDisplayConfiguration() and we known the manager
|
||||
// initial size. This is required so if the OpenFileCommand
|
||||
// (called when we're processing the CLI with OpenBatchOfFiles)
|
||||
// shows a dialog to open a sequence of files, the dialog is
|
||||
// centered correctly to the manager bounds.
|
||||
ui::MessageLoop loop(manager);
|
||||
loop.pumpMessages();
|
||||
// To know the initial manager size we call to
|
||||
// Manager::updateAllDisplaysWithNewScale(...) so we receive a
|
||||
// Manager::onNewDisplayConfiguration() (which will update the
|
||||
// bounds of the manager for first time). This is required so if
|
||||
// the OpenFileCommand (called when we're processing the CLI with
|
||||
// OpenBatchOfFiles) shows a dialog to open a sequence of files,
|
||||
// the dialog is centered correctly to the manager bounds.
|
||||
const int scale = Preferences::instance().general.screenScale();
|
||||
manager->updateAllDisplaysWithNewScale(scale);
|
||||
}
|
||||
#endif // ENABLE_UI
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user