Skip to content

Commit

Permalink
macOS: Fix session restore using wrong monitor's ICC profile
Browse files Browse the repository at this point in the history
The image load occurred before the window position was restored, so the detected ICC profile was based the window's default position before the desired position was restored.
  • Loading branch information
jdpurcell committed Dec 7, 2024
1 parent 6b46f4b commit 3296bae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ void MainWindow::showEvent(QShowEvent *event)

if (!sessionStateToLoad.isEmpty())
{
loadSessionState(sessionStateToLoad, false);
sessionStateToLoad = {};
QTimer::singleShot(0, this, [this]() {
loadSessionState(sessionStateToLoad, false);
sessionStateToLoad = {};
});
}

qvApp->addToActiveWindows(this);
Expand Down

0 comments on commit 3296bae

Please sign in to comment.