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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user