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
4ce228b2
Commit
4ce228b2
authored
Mar 13, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix effect stack cleared on clip copy.
Related to
#1333
parent
8370b5b7
Pipeline
#149619
passed with stage
in 9 minutes and 37 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinefunctions.cpp
View file @
4ce228b2
...
...
@@ -1501,7 +1501,6 @@ QString TimelineFunctions::copyClips(const std::shared_ptr<TimelineItemModel> &t
subtitleOnlyCopy
=
true
;
}
timeline
->
requestClearSelection
();
// TODO better guess for master track
int
masterTid
=
timeline
->
getItemTrackId
(
mainId
);
bool
audioCopy
=
subtitleOnlyCopy
?
false
:
timeline
->
isAudioTrack
(
masterTid
);
...
...
@@ -1561,9 +1560,24 @@ QString TimelineFunctions::copyClips(const std::shared_ptr<TimelineItemModel> &t
container
.
setAttribute
(
QStringLiteral
(
"documentid"
),
pCore
->
currentDoc
()
->
getDocumentProperty
(
QStringLiteral
(
"documentid"
)));
QDomElement
grp
=
copiedItems
.
createElement
(
QStringLiteral
(
"groups"
));
container
.
appendChild
(
grp
);
std
::
unordered_set
<
int
>
groupRoots
;
std
::
transform
(
allIds
.
begin
(),
allIds
.
end
(),
std
::
inserter
(
groupRoots
,
groupRoots
.
begin
()),
[
&
](
int
id
)
{
return
timeline
->
m_groups
->
getRootId
(
id
);
});
std
::
transform
(
allIds
.
begin
(),
allIds
.
end
(),
std
::
inserter
(
groupRoots
,
groupRoots
.
begin
()),
[
&
](
int
id
)
{
int
parent
=
timeline
->
m_groups
->
getRootId
(
id
);
if
(
timeline
->
m_groups
->
getType
(
parent
)
==
GroupType
::
Selection
)
{
std
::
unordered_set
<
int
>
children
=
timeline
->
m_groups
->
getDirectChildren
(
parent
);
for
(
const
auto
&
gid
:
children
)
{
std
::
unordered_set
<
int
>
leaves
=
timeline
->
m_groups
->
getLeaves
(
gid
);
if
(
leaves
.
count
(
id
)
==
1
)
{
return
gid
;
}
}
// This should not happen
qDebug
()
<<
"INCORRECT GROUP ID FOUND"
;
return
-
1
;
}
else
{
return
parent
;
}
});
qDebug
()
<<
"==============
\n
GROUP ROOTS: "
;
for
(
int
gp
:
groupRoots
)
{
...
...
src/timeline2/model/timelinemodel.cpp
View file @
4ce228b2
...
...
@@ -4359,7 +4359,7 @@ Fun TimelineModel::deregisterClip_lambda(int clipId)
{
return
[
this
,
clipId
]()
{
// Clear effect stack
c
learAssetView
(
clipId
);
emit
requestC
learAssetView
(
clipId
);
if
(
!
m_closing
)
{
emit
checkItemDeletion
(
clipId
);
}
...
...
@@ -4799,7 +4799,7 @@ Fun TimelineModel::deregisterComposition_lambda(int compoId)
Q_ASSERT
(
m_allCompositions
.
count
(
compoId
)
>
0
);
Q_ASSERT
(
!
m_groups
->
isInGroup
(
compoId
));
// composition must be ungrouped at this point
requestClearSelection
(
true
);
c
learAssetView
(
compoId
);
emit
requestC
learAssetView
(
compoId
);
m_allCompositions
.
erase
(
compoId
);
m_groups
->
destructGroupItem
(
compoId
);
return
true
;
...
...
@@ -5365,11 +5365,6 @@ void TimelineModel::checkRefresh(int start, int end)
}
}
void
TimelineModel
::
clearAssetView
(
int
itemId
)
{
emit
requestClearAssetView
(
itemId
);
}
std
::
shared_ptr
<
AssetParameterModel
>
TimelineModel
::
getCompositionParameterModel
(
int
compoId
)
const
{
READ_LOCK
();
...
...
src/timeline2/model/timelinemodel.hpp
View file @
4ce228b2
...
...
@@ -881,9 +881,6 @@ protected:
/** @brief Refresh project monitor if cursor was inside range */
void
checkRefresh
(
int
start
,
int
end
);
/** @brief Send signal to require clearing effet/composition view */
void
clearAssetView
(
int
itemId
);
bool
m_blockRefresh
;
signals:
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
4ce228b2
...
...
@@ -547,7 +547,7 @@ void TimelineController::deleteSelectedClips()
// Check if a mix is selected
if
(
m_model
->
m_selectedMix
>
-
1
&&
m_model
->
isClip
(
m_model
->
m_selectedMix
))
{
m_model
->
removeMix
(
m_model
->
m_selectedMix
);
m_model
->
c
learAssetView
(
m_model
->
m_selectedMix
);
m_model
->
requestC
learAssetView
(
m_model
->
m_selectedMix
);
m_model
->
requestClearSelection
(
true
);
}
return
;
...
...
@@ -602,7 +602,6 @@ void TimelineController::copyItem()
QClipboard
*
clipboard
=
QApplication
::
clipboard
();
clipboard
->
setText
(
copyString
);
m_root
->
setProperty
(
"copiedClip"
,
clipId
);
m_model
->
requestSetSelection
(
selectedIds
);
}
bool
TimelineController
::
pasteItem
(
int
position
,
int
tid
)
...
...
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