diff --git a/include/SongEditor.h b/include/SongEditor.h index db4d7d78151..e03c632807e 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -155,6 +155,7 @@ class SongEditorWindow : public Editor protected: virtual void resizeEvent( QResizeEvent * event ); + virtual void changeEvent( QEvent * ); protected slots: void play(); diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 5eb7ff6e2cd..f3b69e47dd5 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -723,6 +723,16 @@ void SongEditorWindow::resizeEvent(QResizeEvent *event) } +void SongEditorWindow::changeEvent(QEvent *event) +{ + QWidget::changeEvent(event); + if (event->type() == QEvent::WindowStateChange) + { + m_editor->realignTracks(); + } +} + + void SongEditorWindow::play() { emit playTriggered();