Commit 1613bcbf authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solving crash when adding a clip, undo, redo, and finally moving the clip.

parent cecae387
......@@ -63,7 +63,7 @@ protected:
/**
* Contains the old trackNumber
*/
int oldTrackNumber;
unsigned int oldTrackNumber;
/**
* Contains the old position
*/
......
......@@ -8,6 +8,7 @@ GraphicsCursorItem::GraphicsCursorItem( const QPen& pen )
setCursor( QCursor( Qt::SizeHorCursor ) );
setZValue( 100 );
// int height;
m_boundingRect = QRectF( -2, 0, 3, height );
}
......
......@@ -146,6 +146,7 @@ void TracksView::addMediaItem( Clip* clip, unsigned int track, qint64 start )
item->setWidth( clip->getLength() );
item->setHeight( tracksHeight() );
item->setParentItem( getTrack( track ) );
item->oldTrackNumber = track;
moveMediaItem( item, track, start );
}
......@@ -371,7 +372,6 @@ void TracksView::dropEvent( QDropEvent* event )
clip,
m_dragItem->trackNumber(),
(qint64)mappedXPos ) );
m_dragItem->oldPosition = mappedXPos;
m_dragItem = NULL;
}
}
......
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