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
cf5c0a47
Commit
cf5c0a47
authored
May 19, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix clip height not aligned to its track.
Fixes
#1435
parent
8ffbef7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
cf5c0a47
...
...
@@ -169,6 +169,10 @@ Rectangle {
}
clipRoot
.
y
=
Logic
.
getTrackById
(
clipRoot
.
fakeTid
).
y
clipRoot
.
height
=
Logic
.
getTrackById
(
clipRoot
.
fakeTid
).
height
}
else
{
clipRoot
.
height
=
Qt
.
binding
(
function
()
{
return
parentTrack
.
height
})
}
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
cf5c0a47
...
...
@@ -3943,6 +3943,26 @@ bool TimelineController::endFakeMove(int clipId, int position, bool updateView,
int
trackId
=
m_model
->
m_allClips
[
clipId
]
->
getFakeTrackId
();
if
(
m_model
->
getClipPosition
(
clipId
)
==
position
&&
m_model
->
getClipTrackId
(
clipId
)
==
trackId
)
{
qDebug
()
<<
"* * ** END FAKE; NO MOVE RQSTED"
;
// Ensure clip height binds again with parent track height
if
(
m_model
->
m_groups
->
isInGroup
(
clipId
))
{
int
groupId
=
m_model
->
m_groups
->
getRootId
(
clipId
);
auto
all_items
=
m_model
->
m_groups
->
getLeaves
(
groupId
);
for
(
int
item
:
all_items
)
{
if
(
m_model
->
isClip
(
item
))
{
m_model
->
m_allClips
[
item
]
->
setFakeTrackId
(
-
1
);
QModelIndex
modelIndex
=
m_model
->
makeClipIndexFromID
(
item
);
if
(
modelIndex
.
isValid
())
{
m_model
->
notifyChange
(
modelIndex
,
modelIndex
,
TimelineModel
::
FakeTrackIdRole
);
}
}
}
}
else
{
m_model
->
m_allClips
[
clipId
]
->
setFakeTrackId
(
-
1
);
QModelIndex
modelIndex
=
m_model
->
makeClipIndexFromID
(
clipId
);
if
(
modelIndex
.
isValid
())
{
m_model
->
notifyChange
(
modelIndex
,
modelIndex
,
TimelineModel
::
FakeTrackIdRole
);
}
}
return
true
;
}
if
(
m_model
->
m_groups
->
isInGroup
(
clipId
))
{
...
...
Write
Preview
Supports
Markdown
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