Skip to content

Commit

Permalink
fixes position marker height on startup (LMMS#3587)
Browse files Browse the repository at this point in the history
Fixes position marker height on startup
  • Loading branch information
BaraMGB authored and PhysSong committed Jul 8, 2017
1 parent 2c12b16 commit 44ad43d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public slots:
void setEditModeSelect();

void updatePosition( const MidiTime & t );
void updatePositionLine();

protected:
virtual void closeEvent( QCloseEvent * ce );
Expand Down Expand Up @@ -152,6 +153,9 @@ class SongEditorWindow : public Editor

SongEditor* m_editor;

protected:
virtual void resizeEvent( QResizeEvent * event );

protected slots:
void play();
void record();
Expand All @@ -162,6 +166,7 @@ protected slots:

signals:
void playTriggered();
void resized();

private:
QAction* m_addBBTrackAction;
Expand Down
17 changes: 17 additions & 0 deletions src/gui/editors/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand All @@ -705,6 +714,14 @@ QSize SongEditorWindow::sizeHint() const
}




void SongEditorWindow::resizeEvent(QResizeEvent *event)
{
emit resized();
}


void SongEditorWindow::play()
{
emit playTriggered();
Expand Down

0 comments on commit 44ad43d

Please sign in to comment.