Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
luyikei
VLMC
Commits
a9104000
Commit
a9104000
authored
Dec 12, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed resize and undo/redo mode
parent
b951d8b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
src/GUI/AbstractGraphicsMediaItem.cpp
src/GUI/AbstractGraphicsMediaItem.cpp
+0
-2
src/Renderer/WorkflowRenderer.cpp
src/Renderer/WorkflowRenderer.cpp
+16
-11
No files found.
src/GUI/AbstractGraphicsMediaItem.cpp
View file @
a9104000
...
@@ -110,7 +110,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
...
@@ -110,7 +110,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
if
(
from
==
BEGINNING
)
if
(
from
==
BEGINNING
)
{
{
// clip()->setEnd( clip()->getBegin() + size );
tracksView
()
->
getRenderer
()
->
resizeClip
(
clip
(),
clip
()
->
getBegin
(),
clip
()
->
getBegin
()
+
size
,
boundingRect
().
x
(),
tracksView
()
->
getRenderer
()
->
resizeClip
(
clip
(),
clip
()
->
getBegin
(),
clip
()
->
getBegin
()
+
size
,
boundingRect
().
x
(),
trackNumber
(),
MainWorkflow
::
VideoTrack
);
trackNumber
(),
MainWorkflow
::
VideoTrack
);
}
}
...
@@ -122,7 +121,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
...
@@ -122,7 +121,6 @@ void AbstractGraphicsMediaItem::resize( qint64 size, From from )
qWarning
(
"Warning: resizing a region with a size below 0"
);
qWarning
(
"Warning: resizing a region with a size below 0"
);
size
+=
clip
()
->
getEnd
()
-
size
;
size
+=
clip
()
->
getEnd
()
-
size
;
}
}
// clip()->setBegin( qMax( clip()->getEnd() - size, (qint64)0 ) );
tracksView
()
->
getRenderer
()
->
resizeClip
(
clip
(),
qMax
(
clip
()
->
getEnd
()
-
size
,
(
qint64
)
0
),
clip
()
->
getEnd
(),
tracksView
()
->
getRenderer
()
->
resizeClip
(
clip
(),
qMax
(
clip
()
->
getEnd
()
-
size
,
(
qint64
)
0
),
clip
()
->
getEnd
(),
startPos
()
+
(
oldLength
-
size
),
trackNumber
(),
MainWorkflow
::
VideoTrack
);
startPos
()
+
(
oldLength
-
size
),
trackNumber
(),
MainWorkflow
::
VideoTrack
);
setStartPos
(
startPos
()
+
(
oldLength
-
size
)
);
setStartPos
(
startPos
()
+
(
oldLength
-
size
)
);
...
...
src/Renderer/WorkflowRenderer.cpp
View file @
a9104000
...
@@ -315,22 +315,27 @@ void WorkflowRenderer::unsplit( Clip* origin, Clip* splitted, uint32_t trackI
...
@@ -315,22 +315,27 @@ void WorkflowRenderer::unsplit( Clip* origin, Clip* splitted, uint32_t trackI
void
WorkflowRenderer
::
resizeClip
(
Clip
*
clip
,
qint64
newBegin
,
qint64
newEnd
,
void
WorkflowRenderer
::
resizeClip
(
Clip
*
clip
,
qint64
newBegin
,
qint64
newEnd
,
qint64
newPos
,
uint32_t
trackId
,
MainWorkflow
::
TrackType
trackType
,
bool
undoRedoAction
/*= false*/
)
qint64
newPos
,
uint32_t
trackId
,
MainWorkflow
::
TrackType
trackType
,
bool
undoRedoAction
/*= false*/
)
{
{
if
(
m_isRendering
==
true
)
// if ( m_isRendering == true )
{
// {
Action
::
Generic
*
act
=
new
Action
::
ResizeClip
(
clip
,
newBegin
,
newEnd
);
// Action::Generic* act = new Action::ResizeClip( clip, newBegin, newEnd );
Action
::
Generic
*
act2
=
new
Action
::
MoveClip
(
m_mainWorkflow
,
clip
->
getUuid
(),
trackId
,
trackId
,
newPos
,
trackType
,
undoRedoAction
);
// Action::Generic* act2 = new Action::MoveClip( m_mainWorkflow, clip->getUuid(), trackId, trackId, newPos, trackType, undoRedoAction );
QMutexLocker
lock
(
m_actionsMutex
);
// QMutexLocker lock( m_actionsMutex );
m_actions
.
addAction
(
act
);
// if ( newBegin != clip->getBegin() )
m_actions
.
addAction
(
act2
);
// {
}
// qDebug() << "Resizing to pos:" << newPos;
else
// m_actions.addAction( act2 );
{
// }
// qDebug() << "setting boundaries: newEnd:" << newBegin << "newEnd:" << newEnd;
// m_actions.addAction( act );
// }
// else
// {
if
(
newBegin
!=
clip
->
getBegin
()
)
if
(
newBegin
!=
clip
->
getBegin
()
)
{
{
m_mainWorkflow
->
moveClip
(
clip
->
getUuid
(),
trackId
,
trackId
,
newPos
,
trackType
,
undoRedoAction
);
m_mainWorkflow
->
moveClip
(
clip
->
getUuid
(),
trackId
,
trackId
,
newPos
,
trackType
,
undoRedoAction
);
}
}
clip
->
setBoundaries
(
newBegin
,
newEnd
);
clip
->
setBoundaries
(
newBegin
,
newEnd
);
}
//
}
}
}
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment