Commit 2c1dfcc8 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Timeline: finally fixed the right way!

This is more CPU efficient than the processEvent inlined in a method :-)
parent 12607d9f
......@@ -51,6 +51,7 @@ public:
void setHeight( int height )
{
setPreferredHeight( height );
adjustSize();
updateGeometry();
}
......
......@@ -102,6 +102,7 @@ void TracksView::addVideoTrack()
GraphicsTrack* track = new GraphicsTrack( GraphicsTrack::Video, m_numVideoTrack );
track->setHeight( m_tracksHeight );
m_layout->insertItem( 0, track );
m_layout->activate();
setSceneRect( m_layout->contentsRect().adjusted( 0, 0, 100, 100 ) );
m_cursorLine->setHeight( m_layout->contentsRect().height() );
m_scene->invalidate(); // Redraw the background
......@@ -113,6 +114,7 @@ void TracksView::addAudioTrack()
GraphicsTrack* track = new GraphicsTrack( GraphicsTrack::Audio, 0 );
track->setHeight( m_tracksHeight );
m_layout->insertItem( 1000, track );
m_layout->activate();
setSceneRect( m_layout->contentsRect().adjusted( 0, 0, 100, 100 ) );
m_cursorLine->setHeight( m_layout->contentsRect().height() );
m_scene->invalidate(); // Redraw the background
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment