Commit e210c4d7 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Treat all tracks counters as unsigned.

parent f2827cac
......@@ -43,7 +43,7 @@ void AbstractGraphicsMediaItem::mouseReleaseEvent( QGraphicsSceneMouseEvent* )
setCursor( Qt::OpenHandCursor );
}
int AbstractGraphicsMediaItem::trackNumber()
quint32 AbstractGraphicsMediaItem::trackNumber()
{
if ( parentItem() )
{
......
......@@ -51,7 +51,7 @@ public:
virtual const QUuid& uuid() const = 0;
/// Return the current track of the item
int trackNumber();
quint32 trackNumber();
protected:
/**
......
......@@ -260,11 +260,9 @@ void TracksView::moveMediaItem( AbstractGraphicsMediaItem* item, QPoint position
moveMediaItem( item, track->trackNumber(), (qint64)time);
}
void TracksView::moveMediaItem( AbstractGraphicsMediaItem* item, int track, qint64 time )
void TracksView::moveMediaItem( AbstractGraphicsMediaItem* item, quint32 track, qint64 time )
{
if ( track < 0 )
track = 0;
else if ( track > m_numVideoTrack - 1)
if ( track > m_numVideoTrack - 1)
track = m_numVideoTrack - 1;
QPointF oldPos = item->pos();
......
......@@ -85,7 +85,7 @@ private:
void addVideoTrack();
void addAudioTrack();
void moveMediaItem( AbstractGraphicsMediaItem* item, QPoint position );
void moveMediaItem( AbstractGraphicsMediaItem* item, int track, qint64 time );
void moveMediaItem( AbstractGraphicsMediaItem* item, quint32 track, qint64 time );
GraphicsTrack* getTrack( unsigned int number );
QGraphicsScene* m_scene;
int m_tracksHeight;
......@@ -94,8 +94,8 @@ private:
int m_fps;
GraphicsCursorItem* m_cursorLine;
QGraphicsLinearLayout* m_layout;
int m_numVideoTrack;
int m_numAudioTrack;
quint32 m_numVideoTrack;
quint32 m_numAudioTrack;
MainWorkflow* m_mainWorkflow;
GraphicsMovieItem* m_dragItem;
QGraphicsWidget* m_separator;
......
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