diff --git a/ChangeLog b/ChangeLog index bd9084270..a924c4fc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-20 Paul Giblock + + * src/core/main_window: + fixed flashing/moving windows on project load + 2007-11-19 Paul Giblock * plugins/midi_import/midi_import.cpp: diff --git a/src/core/main_window.cpp b/src/core/main_window.cpp index a8f879ed8..97bfd5466 100644 --- a/src/core/main_window.cpp +++ b/src/core/main_window.cpp @@ -564,13 +564,18 @@ void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de ) tMax( 0, _de.attribute( "y" ).toInt() ), _de.attribute( "width" ).toInt(), _de.attribute( "height" ).toInt() ); - if( !r.isNull() && _w->parentWidget() != NULL ) + if( !r.isNull()) { _w->show(); - if( _w->parentWidget() != NULL ) + if (_w->parentWidget() != NULL && + _w->parentWidget()->inherits("QMdiSubWindow")) { - _w->parentWidget()->move( r.topLeft() ); + _w = _w->parentWidget(); } + + _w->show(); + + _w->move( r.topLeft() ); _w->setShown( _de.attribute( "visible" ).toInt() ); _w->resize( r.size() ); }