Skip to content
GitLab
Menu
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
4f522688
Commit
4f522688
authored
May 10, 2021
by
Julius Künzel
Browse files
Further fixes for guide moving on spacer operations
Related to
9a08ea41
parent
1bb40db3
Pipeline
#61496
passed with stage
in 8 minutes and 12 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/model/markerlistmodel.cpp
View file @
4f522688
...
...
@@ -447,7 +447,7 @@ QList<CommentedTime> MarkerListModel::getMarkersInRange(int start, int end) cons
QList
<
CommentedTime
>
markers
;
for
(
const
auto
&
marker
:
m_markerList
)
{
int
pos
=
marker
.
second
.
time
().
frames
(
pCore
->
getCurrentFps
());
if
(
pos
>
start
&&
(
end
==
-
1
||
pos
<
end
))
{
if
(
pos
>
=
start
&&
(
end
==
-
1
||
pos
<
=
end
))
{
markers
<<
marker
.
second
;
}
}
...
...
src/timeline2/model/timelinefunctions.cpp
View file @
4f522688
...
...
@@ -390,7 +390,7 @@ int TimelineFunctions::requestSpacerStartOperation(const std::shared_ptr<Timelin
return
-
1
;
}
bool
TimelineFunctions
::
requestSpacerEndOperation
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
itemId
,
int
startPosition
,
int
endPosition
,
int
affectedTrack
,
Fun
&
undo
,
Fun
&
redo
)
bool
TimelineFunctions
::
requestSpacerEndOperation
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
itemId
,
int
startPosition
,
int
endPosition
,
int
affectedTrack
,
bool
moveGuides
,
Fun
&
undo
,
Fun
&
redo
)
{
// Move group back to original position
int
track
=
timeline
->
getItemTrackId
(
itemId
);
...
...
@@ -403,7 +403,7 @@ bool TimelineFunctions::requestSpacerEndOperation(const std::shared_ptr<Timeline
timeline
->
requestSubtitleMove
(
itemId
,
startPosition
,
false
,
false
);
}
// Move guides
if
(
!
KdenliveSettings
::
locked
Guides
()
)
{
if
(
move
Guides
)
{
GenTime
fromPos
(
startPosition
,
pCore
->
getCurrentFps
());
GenTime
toPos
(
endPosition
,
pCore
->
getCurrentFps
());
QList
<
CommentedTime
>
guides
=
pCore
->
currentDoc
()
->
getGuideModel
()
->
getMarkersInRange
(
startPosition
,
-
1
);
...
...
@@ -1912,7 +1912,7 @@ bool TimelineFunctions::requestDeleteBlankAt(const std::shared_ptr<TimelineItemM
// Start undoable command
std
::
function
<
bool
(
void
)
>
undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
redo
=
[]()
{
return
true
;
};
requestSpacerEndOperation
(
timeline
,
cid
,
start
,
start
-
spaceDuration
,
affectAllTracks
?
-
1
:
trackId
,
undo
,
redo
);
requestSpacerEndOperation
(
timeline
,
cid
,
start
,
start
-
spaceDuration
,
affectAllTracks
?
-
1
:
trackId
,
!
KdenliveSettings
::
lockedGuides
(),
undo
,
redo
);
return
true
;
}
...
...
src/timeline2/model/timelinefunctions.hpp
View file @
4f522688
...
...
@@ -86,7 +86,7 @@ struct TimelineFunctions
static
bool
requestDeleteBlankAt
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
trackId
,
int
position
,
bool
affectAllTracks
);
static
int
requestSpacerStartOperation
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
trackId
,
int
position
);
static
bool
requestSpacerEndOperation
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
itemId
,
int
startPosition
,
int
endPosition
,
int
affectedTrack
,
Fun
&
undo
,
Fun
&
redo
);
static
bool
requestSpacerEndOperation
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
itemId
,
int
startPosition
,
int
endPosition
,
int
affectedTrack
,
bool
moveGuides
,
Fun
&
undo
,
Fun
&
redo
);
static
bool
extractZone
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QVector
<
int
>
tracks
,
QPoint
zone
,
bool
liftOnly
);
static
bool
liftZone
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
trackId
,
QPoint
zone
,
Fun
&
undo
,
Fun
&
redo
);
static
bool
removeSpace
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QPoint
zone
,
Fun
&
undo
,
Fun
&
redo
,
QVector
<
int
>
allowedTracks
=
QVector
<
int
>
(),
bool
useTargets
=
true
);
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
4f522688
...
...
@@ -1642,10 +1642,10 @@ bool TimelineController::requestSpacerEndOperation(int clipId, int startPosition
// Start undoable command
std
::
function
<
bool
(
void
)
>
undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
redo
=
[]()
{
return
true
;
};
if
(
guideStart
>
-
1
&&
KdenliveSettings
::
lockedGuides
()
)
{
if
(
guideStart
>
-
1
)
{
moveGuidesInRange
(
guideStart
,
-
1
,
endPosition
-
startPosition
,
undo
,
redo
);
}
bool
result
=
TimelineFunctions
::
requestSpacerEndOperation
(
m_model
,
clipId
,
startPosition
,
endPosition
,
affectedTrack
,
undo
,
redo
);
bool
result
=
TimelineFunctions
::
requestSpacerEndOperation
(
m_model
,
clipId
,
startPosition
,
endPosition
,
affectedTrack
,
false
,
undo
,
redo
);
return
result
;
}
...
...
manuel muzzurru
@manuelmuzzurru
mentioned in commit
9a08ea41
·
May 11, 2021
mentioned in commit
9a08ea41
mentioned in commit 9a08ea41e94c5e883f3bcc46b105cfe1df9c5212
Toggle commit list
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