Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
3a75a92c
Commit
3a75a92c
authored
Jun 25, 2009
by
Ludovic Fauvet
Browse files
Update of the clipMoved event with the old track position
parent
8af99b48
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/gui/AbstractGraphicsMediaItem.cpp
View file @
3a75a92c
...
...
@@ -22,7 +22,8 @@
#include "AbstractGraphicsMediaItem.h"
AbstractGraphicsMediaItem
::
AbstractGraphicsMediaItem
()
:
m_tracksView
(
NULL
)
AbstractGraphicsMediaItem
::
AbstractGraphicsMediaItem
()
:
m_tracksView
(
NULL
),
oldTrackNumber
(
-
1
)
{
setCursor
(
Qt
::
OpenHandCursor
);
}
...
...
src/gui/AbstractGraphicsMediaItem.h
View file @
3a75a92c
...
...
@@ -56,6 +56,11 @@ protected:
*/
TracksView
*
tracksView
();
/**
* Contains the old trackNumber
*/
int
oldTrackNumber
;
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
...
...
src/gui/TracksView.cpp
View file @
3a75a92c
...
...
@@ -246,6 +246,7 @@ void TracksView::dropEvent( QDropEvent* event )
event
->
acceptProposedAction
();
qreal
mappedXPos
=
(
mapToScene
(
event
->
pos
()
).
x
()
+
0.5
);
m_dragItem
->
oldTrackNumber
=
m_dragItem
->
trackNumber
();
m_mainWorkflow
->
addClip
(
m_dragItem
->
clip
(),
m_dragItem
->
trackNumber
(),
(
qint64
)
mappedXPos
);
...
...
@@ -360,8 +361,10 @@ void TracksView::mouseReleaseEvent( QMouseEvent* event )
if
(
m_layout
->
itemAt
(
0
)
->
graphicsItem
()
->
childItems
().
count
()
>
0
)
addVideoTrack
();
emit
clipMoved
(
movieItem
->
clip
()
->
getUuid
(),
movieItem
->
oldTrackNumber
,
movieItem
->
trackNumber
(),
(
qint64
)
movieItem
->
pos
().
x
()
);
movieItem
->
oldTrackNumber
=
movieItem
->
trackNumber
();
m_actionMove
=
false
;
m_actionRelativeX
=
-
1
;
m_actionItem
=
NULL
;
...
...
src/gui/TracksView.h
View file @
3a75a92c
...
...
@@ -134,7 +134,7 @@ signals:
void
zoomIn
();
void
zoomOut
();
void
durationChanged
(
int
duration
);
void
clipMoved
(
const
QUuid
&
uuid
,
int
t
rack
,
qint64
start
);
void
clipMoved
(
const
QUuid
&
uuid
,
int
oldTrack
,
int
newT
rack
,
qint64
start
);
};
#endif // TRACKSVIEW_H
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