Fixed Project Manager to enable save/restore of the window geometry so its window position/sizing will be restored after it is closed/re-launched. Also improved WindowDecorationWrapper logic to center by default when using the showFromSettings API for first time launch.

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
monroegm-disable-blank-issue-2
Chris Galvan 5 years ago
parent dbe6bb673e
commit edbe05bd81

@ -661,6 +661,10 @@ namespace AzQtComponents
if (!restoreGeometryFromSettings())
{
show();
// If we failed to restore from settings (the first time this window is loaded),
// then center it on the screen by default
centerOnScreen(this);
}
}

@ -170,7 +170,8 @@ namespace O3DE::ProjectManager
// the decoration wrapper is intended to remember window positioning and sizing
auto wrapper = new AzQtComponents::WindowDecorationWrapper();
wrapper->setGuest(m_mainWindow.data());
wrapper->show();
wrapper->enableSaveRestoreGeometry("O3DE", "ProjectManager", "mainWindowGeometry");
wrapper->showFromSettings();
m_mainWindow->show();
qApp->setQuitOnLastWindowClosed(true);

Loading…
Cancel
Save