Skip to content

Commit

Permalink
Disable restoring UI position
Browse files Browse the repository at this point in the history
Restoring the ui to a previously stored place that is potentially not the primary monitor causes issues for some users. See #5047
Until we can figure out why this is happening and can be resolved, restoring the ui position is intentionally disabled
  • Loading branch information
scamille committed Feb 12, 2023
1 parent d798862 commit 6fd46d3
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions qt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,24 @@ void SC_MainWindow::loadHistory()
tr( "We have reset your configuration settings due to major changes to the GUI" ) );
}

QVariant size = settings.value( "gui/size" );
QRect savedApplicationGeometry = geometry();
if ( size.isValid() )
// Restoring the ui to a previously stored place that is potentially not the primary monitor causes issues for some users. See https://github.com/simulationcraft/simc/issues/5047
// Until we can figure out why this is happening and can be resolved, restoring the ui position is intentionally disabled
if constexpr(false)
{
savedApplicationGeometry.setSize( size.toSize() );
}
QVariant pos = settings.value( "gui/position" );
if ( pos.isValid() )
{
savedApplicationGeometry.moveTopLeft( pos.toPoint() );
QVariant size = settings.value( "gui/size" );
QRect savedApplicationGeometry = geometry();
if ( size.isValid() )
{
savedApplicationGeometry.setSize( size.toSize() );
}
QVariant pos = settings.value( "gui/position" );
if ( pos.isValid() )
{
savedApplicationGeometry.moveTopLeft( pos.toPoint() );
}
setGeometry(savedApplicationGeometry);
}
setGeometry(savedApplicationGeometry);

QVariant maximized = settings.value( "gui/maximized" );
if ( maximized.isValid() )
{
Expand Down

0 comments on commit 6fd46d3

Please sign in to comment.