From 3d8b8ed1fb19dad476b29979f56be33e41ed014a Mon Sep 17 00:00:00 2001 From: Steffen Baranowsky Date: Mon, 29 May 2017 15:47:26 +0200 Subject: [PATCH 1/2] fixes position marker height on startup --- include/SongEditor.h | 5 +++++ src/gui/editors/SongEditor.cpp | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/include/SongEditor.h b/include/SongEditor.h index e8961b8bc0e..db4d7d78151 100644 --- a/include/SongEditor.h +++ b/include/SongEditor.h @@ -81,6 +81,7 @@ public slots: void setEditModeSelect(); void updatePosition( const MidiTime & t ); + void updatePositionLine(); protected: virtual void closeEvent( QCloseEvent * ce ); @@ -152,6 +153,9 @@ class SongEditorWindow : public Editor SongEditor* m_editor; +protected: + virtual void resizeEvent( QResizeEvent * event ); + protected slots: void play(); void record(); @@ -162,6 +166,7 @@ protected slots: signals: void playTriggered(); + void resized(); private: QAction* m_addBBTrackAction; diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 699fa5eac20..34bc7811e86 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -586,6 +586,14 @@ void SongEditor::updatePosition( const MidiTime & t ) +void SongEditor::updatePositionLine() +{ + m_positionLine->setFixedHeight( height() ); +} + + + + void SongEditor::zoomingChanged() { setPixelsPerTact( m_zoomLevels[m_zoomingModel->value()] * DEFAULT_PIXELS_PER_TACT ); @@ -697,6 +705,7 @@ SongEditorWindow::SongEditorWindow(Song* song) : zoomToolBar->addWidget( m_zoomingComboBox ); connect(song, SIGNAL(projectLoaded()), this, SLOT(adjustUiAfterProjectLoad())); + connect( this, SIGNAL(resized() ), m_editor, SLOT( updatePositionLine() ) ); } QSize SongEditorWindow::sizeHint() const @@ -705,6 +714,14 @@ QSize SongEditorWindow::sizeHint() const } + + +void SongEditorWindow::resizeEvent(QResizeEvent *event) +{ + emit resized(); +} + + void SongEditorWindow::play() { emit playTriggered(); From 0f4d9215dabf376f2c64f7faf34076cb2474fcf7 Mon Sep 17 00:00:00 2001 From: Steffen Baranowsky Date: Thu, 1 Jun 2017 14:28:05 +0200 Subject: [PATCH 2/2] spacing I --- src/gui/editors/SongEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/editors/SongEditor.cpp b/src/gui/editors/SongEditor.cpp index 34bc7811e86..d110201c8ee 100644 --- a/src/gui/editors/SongEditor.cpp +++ b/src/gui/editors/SongEditor.cpp @@ -705,7 +705,7 @@ SongEditorWindow::SongEditorWindow(Song* song) : zoomToolBar->addWidget( m_zoomingComboBox ); connect(song, SIGNAL(projectLoaded()), this, SLOT(adjustUiAfterProjectLoad())); - connect( this, SIGNAL(resized() ), m_editor, SLOT( updatePositionLine() ) ); + connect(this, SIGNAL(resized()), m_editor, SLOT(updatePositionLine())); } QSize SongEditorWindow::sizeHint() const