mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-08 03:42:09 +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)
|
// 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user