Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
47cd52bc
Commit
47cd52bc
authored
Aug 04, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont' process insert when no track active, don't move cursor if no clip inserted
parent
7829301a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
src/timeline2/model/timelinefunctions.cpp
src/timeline2/model/timelinefunctions.cpp
+8
-1
No files found.
src/timeline2/model/timelinefunctions.cpp
View file @
47cd52bc
...
...
@@ -347,6 +347,9 @@ bool TimelineFunctions::insertZone(const std::shared_ptr<TimelineItemModel> &tim
}
++
it
;
}
if
(
affectedTracks
.
isEmpty
())
{
return
false
;
}
result
=
breakAffectedGroups
(
timeline
,
affectedTracks
,
QPoint
(
insertFrame
,
insertFrame
+
(
zone
.
y
()
-
zone
.
x
())),
undo
,
redo
);
if
(
overwrite
)
{
// Cut all tracks
...
...
@@ -369,11 +372,15 @@ bool TimelineFunctions::insertZone(const std::shared_ptr<TimelineItemModel> &tim
result
=
result
&&
TimelineFunctions
::
requestInsertSpace
(
timeline
,
QPoint
(
insertFrame
,
insertFrame
+
(
zone
.
y
()
-
zone
.
x
())),
undo
,
redo
,
affectedTracks
);
}
bool
clipInserted
=
false
;
if
(
result
)
{
if
(
!
trackIds
.
isEmpty
())
{
int
newId
=
-
1
;
QString
binClipId
=
QString
(
"%1/%2/%3"
).
arg
(
binId
).
arg
(
zone
.
x
()).
arg
(
zone
.
y
()
-
1
);
result
=
timeline
->
requestClipInsertion
(
binClipId
,
trackIds
.
first
(),
insertFrame
,
newId
,
true
,
true
,
useTargets
,
undo
,
redo
,
affectedTracks
);
if
(
result
)
{
clipInserted
=
true
;
}
}
if
(
result
)
{
pCore
->
pushUndo
(
undo
,
redo
,
overwrite
?
i18n
(
"Overwrite zone"
)
:
i18n
(
"Insert zone"
));
...
...
@@ -383,7 +390,7 @@ bool TimelineFunctions::insertZone(const std::shared_ptr<TimelineItemModel> &tim
qDebug
()
<<
"// REQUESTING SPACE FAILED"
;
undo
();
}
return
result
;
return
clipInserted
;
}
bool
TimelineFunctions
::
liftZone
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
trackId
,
QPoint
zone
,
Fun
&
undo
,
Fun
&
redo
)
...
...
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