Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
39ac8527
Commit
39ac8527
authored
Mar 20, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix zone out snapping has a 1 frame offset
parent
58521006
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/monitor/monitor.cpp
View file @
39ac8527
...
...
@@ -715,8 +715,7 @@ void Monitor::slotSetZoneStart()
void
Monitor
::
slotSetZoneEnd
()
{
int
pos
=
m_glMonitor
->
getCurrentPos
()
+
1
;
m_glMonitor
->
getControllerProxy
()
->
setZoneOut
(
pos
);
m_glMonitor
->
getControllerProxy
()
->
setZoneOut
(
m_glMonitor
->
getCurrentPos
()
+
1
);
if
(
m_controller
)
{
m_controller
->
setZone
(
m_glMonitor
->
getControllerProxy
()
->
zone
());
}
...
...
src/monitor/monitorproxy.cpp
View file @
39ac8527
...
...
@@ -140,11 +140,11 @@ void MonitorProxy::setZoneIn(int pos)
void
MonitorProxy
::
setZoneOut
(
int
pos
)
{
if
(
m_zoneOut
>
0
)
{
emit
removeSnap
(
m_zoneOut
);
emit
removeSnap
(
m_zoneOut
-
1
);
}
m_zoneOut
=
pos
;
if
(
pos
>
0
)
{
emit
addSnap
(
pos
);
emit
addSnap
(
m_zoneOut
-
1
);
}
emit
zoneChanged
();
emit
saveZone
();
...
...
@@ -156,7 +156,7 @@ void MonitorProxy::setZone(int in, int out, bool sendUpdate)
emit
removeSnap
(
m_zoneIn
);
}
if
(
m_zoneOut
>
0
)
{
emit
removeSnap
(
m_zoneOut
);
emit
removeSnap
(
m_zoneOut
-
1
);
}
m_zoneIn
=
in
;
m_zoneOut
=
out
;
...
...
@@ -164,7 +164,7 @@ void MonitorProxy::setZone(int in, int out, bool sendUpdate)
emit
addSnap
(
m_zoneIn
);
}
if
(
m_zoneOut
>
0
)
{
emit
addSnap
(
m_zoneOut
);
emit
addSnap
(
m_zoneOut
-
1
);
}
emit
zoneChanged
();
if
(
sendUpdate
)
{
...
...
src/monitor/view/kdenliveclipmonitor.qml
View file @
39ac8527
...
...
@@ -271,7 +271,7 @@ Item {
text
:
i18n
(
"
Out Point
"
)
color
:
"
white
"
background
:
Rectangle
{
color
:
"
#
ff45
00
"
color
:
"
#
7700
00
"
}
padding
:
4
horizontalAlignment
:
TextInput
.
AlignHCenter
...
...
src/monitor/view/kdenlivemonitor.qml
View file @
39ac8527
...
...
@@ -177,7 +177,7 @@ Item {
text
:
i18n
(
"
Out Point
"
)
color
:
"
white
"
background
:
Rectangle
{
color
:
"
#
ff45
00
"
color
:
"
#
7700
00
"
}
padding
:
5
horizontalAlignment
:
TextInput
.
AlignHCenter
...
...
src/timeline2/model/timelinemodel.cpp
View file @
39ac8527
...
...
@@ -2724,7 +2724,7 @@ int TimelineModel::getNextSnapPos(int pos, std::vector<size_t> &snaps)
}
++
it
;
}
if
(
tracks
.
isEmpty
())
{
if
(
tracks
.
isEmpty
()
||
tracks
.
count
()
==
(
int
)
m_allTracks
.
size
()
)
{
// No active track, use all possible snap points
return
m_snaps
->
getNextPoint
((
int
)
pos
);
}
...
...
@@ -2757,7 +2757,7 @@ int TimelineModel::getPreviousSnapPos(int pos, std::vector<size_t> &snaps)
}
++
it
;
}
if
(
tracks
.
isEmpty
())
{
if
(
tracks
.
isEmpty
()
||
tracks
.
count
()
==
(
int
)
m_allTracks
.
size
()
)
{
// No active track, use all possible snap points
return
m_snaps
->
getPreviousPoint
((
int
)
pos
);
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
39ac8527
...
...
@@ -682,7 +682,7 @@ void TimelineController::gotoNextSnap()
{
std
::
vector
<
size_t
>
snaps
=
pCore
->
projectManager
()
->
current
()
->
getGuideModel
()
->
getSnapPoints
();
snaps
.
push_back
(
m_zone
.
x
());
snaps
.
push_back
(
m_zone
.
y
());
snaps
.
push_back
(
m_zone
.
y
()
-
1
);
int
nextSnap
=
m_model
->
getNextSnapPos
(
pCore
->
getTimelinePosition
(),
snaps
);
if
(
nextSnap
>
pCore
->
getTimelinePosition
())
{
setPosition
(
nextSnap
);
...
...
@@ -694,7 +694,7 @@ void TimelineController::gotoPreviousSnap()
if
(
pCore
->
getTimelinePosition
()
>
0
)
{
std
::
vector
<
size_t
>
snaps
=
pCore
->
projectManager
()
->
current
()
->
getGuideModel
()
->
getSnapPoints
();
snaps
.
push_back
(
m_zone
.
x
());
snaps
.
push_back
(
m_zone
.
y
());
snaps
.
push_back
(
m_zone
.
y
()
-
1
);
setPosition
(
m_model
->
getPreviousSnapPos
(
pCore
->
getTimelinePosition
(),
snaps
));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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