Commit 9856736b authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MainWindow: Don't restore geometry only if the crash handler is active.

parent e8cf379b
......@@ -39,11 +39,7 @@ DockWidgetManager::DockWidgetManager( QObject *parent )
DockWidgetManager::~DockWidgetManager()
{
QList<QDockWidget*> widgets = m_dockWidgets.values();
QDockWidget* dockWidget;
foreach( dockWidget, widgets )
delete dockWidget;
qDeleteAll( m_dockWidgets );
}
void DockWidgetManager::setMainWindow( MainWindow *mainWin )
......
......@@ -130,6 +130,11 @@ MainWindow::MainWindow( QWidget *parent ) :
#endif
QSettings s;
// Restore the geometry
restoreGeometry( s.value( "MainWindowGeometry" ).toByteArray() );
// Restore the layout
restoreState( s.value( "MainWindowState" ).toByteArray() );
if ( s.value( "ShowWizardStartup", true ).toBool() )
{
//If a project was opened from the command line: don't show the wizard.
......@@ -794,11 +799,6 @@ MainWindow::restoreSession()
{
bool cleanQuit = s.value( "CleanQuit", true ).toBool();
// Restore the geometry
restoreGeometry( s.value( "MainWindowGeometry" ).toByteArray() );
// Restore the layout
restoreState( s.value( "MainWindowState" ).toByteArray() );
if ( cleanQuit == false )
{
QMessageBox::StandardButton res = QMessageBox::question( this, tr( "Crash recovery" ), tr( "VLMC didn't closed nicely. Do you want to recover your project?" ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment