From ac7ece6680943cd07f1e925c1ced20b13356ecc6 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Tue, 23 Oct 2018 16:43:12 +0900 Subject: [PATCH] Fix song editor visualization after maximizing --- include/SongEditor.h | 1 + src/gui/editors/SongEditor.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) 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..4fe72ad42bf 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();