Commit 246f862d authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Refactored clip moving.

Old position isn't required anymore.
parent 9faaf73c
......@@ -60,14 +60,14 @@ void Commands::MainWorkflow::AddClip::undo()
}
Commands::MainWorkflow::MoveClip::MoveClip( ::MainWorkflow* workflow, const QUuid& uuid,
unsigned int oldTrack, qint64 oldPos, unsigned int newTrack, qint64 newPos,
unsigned int oldTrack, unsigned int newTrack, qint64 newPos,
::MainWorkflow::TrackType trackType ) :
m_workflow( workflow ), m_uuid( uuid ), m_oldTrack( oldTrack ),
m_newTrack( newTrack ), m_pos( newPos ), m_oldPos( oldPos ),
m_trackType( trackType )
m_newTrack( newTrack ), m_pos( newPos ), m_trackType( trackType )
{
setText( QObject::tr( "Moving clip" ) );
m_undoRedoAction = false;
m_oldPos = m_workflow->getClipPosition( uuid, oldTrack, trackType );
}
void Commands::MainWorkflow::MoveClip::redo()
......
......@@ -67,7 +67,7 @@ namespace Commands
{
public:
MoveClip( ::MainWorkflow* workflow, const QUuid& uuid,
unsigned int oldTrack, qint64 oldPos, unsigned int newTrack,
unsigned int oldTrack, unsigned int newTrack,
qint64 newPos, ::MainWorkflow::TrackType trackType );
virtual void redo();
virtual void undo();
......
......@@ -616,7 +616,6 @@ void TracksView::mouseReleaseEvent( QMouseEvent* event )
Commands::trigger( new Commands::MainWorkflow::MoveClip( m_mainWorkflow,
movieItem->clip()->getUuid(),
movieItem->oldTrackNumber,
movieItem->oldPosition,
movieItem->trackNumber(),
movieItem->startPos(),
MainWorkflow::VideoTrack ) );
......
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