Commit 14466318 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed useless parameter for unsplit

parent 787bcd1b
......@@ -154,10 +154,8 @@ Commands::MainWorkflow::SplitClip::SplitClip( WorkflowRenderer* renderer, Clip*
m_trackId( trackId ),
m_newClipPos( newClipPos ),
m_newClipBegin( newClipBegin ),
m_clipOldEnd( toSplit->getEnd() ),
m_trackType( trackType )
{
m_clipOldEnd = m_toSplit->getEnd();
setText( QObject::tr("Splitting clip") );
}
......@@ -174,5 +172,5 @@ void Commands::MainWorkflow::SplitClip::redo()
void Commands::MainWorkflow::SplitClip::undo()
{
m_renderer->unsplit( m_toSplit, m_newClip, m_trackId, m_clipOldEnd, m_trackType );
m_renderer->unsplit( m_toSplit, m_newClip, m_trackId, m_trackType );
}
......@@ -146,7 +146,6 @@ namespace Commands
uint32_t m_trackId;
qint64 m_newClipPos;
qint64 m_newClipBegin;
qint64 m_clipOldEnd;
::MainWorkflow::TrackType m_trackType;
};
}
......
......@@ -293,14 +293,14 @@ Clip* WorkflowRenderer::split( Clip* toSplit, Clip* newClip, uint32_t trac
return newClip;
}
void WorkflowRenderer::unsplit( Clip* origin, Clip* splitted, uint32_t trackId, qint64 oldEnd, MainWorkflow::TrackType trackType )
void WorkflowRenderer::unsplit( Clip* origin, Clip* splitted, uint32_t trackId, MainWorkflow::TrackType trackType )
{
if ( m_isRendering == true )
{
//removing clip
Action::Generic* act = new Action::RemoveClip( m_mainWorkflow, trackId, trackType, splitted->getUuid() );
//resizing it
Action::Generic* act2 = new Action::ResizeClip( origin, origin->getBegin(), oldEnd, true );
Action::Generic* act2 = new Action::ResizeClip( origin, origin->getBegin(), splitted->getEnd(), true );
//Push the actions onto the action stack
QMutexLocker lock( m_actionsMutex );
m_actions.addAction( act );
......@@ -309,7 +309,7 @@ void WorkflowRenderer::unsplit( Clip* origin, Clip* splitted, uint32_t trackI
else
{
m_mainWorkflow->removeClip( splitted->getUuid(), trackId, trackType );
origin->setEnd( oldEnd, true );
origin->setEnd( splitted->getEnd(), true );
}
}
......
......@@ -63,7 +63,7 @@ class WorkflowRenderer : public GenericRenderer
* \return The newly created clip if "newClip" was NULL; else, newClip is returned.
*/
Clip* split( Clip* toSplit, Clip* newClip, uint32_t trackId, qint64 newClipPos, qint64 newClipBegin, MainWorkflow::TrackType trackType );
void unsplit( Clip* origin, Clip* splitted, uint32_t trackId, qint64 oldEnd, MainWorkflow::TrackType trackType );
void unsplit( Clip* origin, Clip* splitted, uint32_t trackId, MainWorkflow::TrackType trackType );
/**
* \param undoRedoAction: if true, the potential move resulting from the resize will be emmited to the GUI.
* if this is not an undo redo action, the GUI is already aware of the move.
......
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