Fix invisible editors on project load by validating size (#4502)

This commit is contained in:
Lukas W
2018-09-03 12:39:23 +02:00
committed by Hyunjin Song
parent 4bb6586c66
commit 6f32c962b4

View File

@@ -802,7 +802,10 @@ void MainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
// first restore the window, as attempting to resize a maximized window causes graphics glitching
_w->setWindowState( _w->windowState() & ~(Qt::WindowMaximized | Qt::WindowMinimized) );
_w->resize( r.size() );
// Check isEmpty() to work around corrupt project files with empty size
if ( ! r.size().isEmpty() ) {
_w->resize( r.size() );
}
_w->move( r.topLeft() );
// set the window to its correct minimized/maximized/restored state