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
e58e316f
Commit
e58e316f
authored
Dec 11, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix saving project with several clip groups selected discarded those groups
parent
4075f59b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/timeline2/model/groupsmodel.cpp
View file @
e58e316f
...
...
@@ -745,10 +745,17 @@ const QString GroupsModel::toJson() const
{
std
::
unordered_set
<
int
>
roots
;
std
::
transform
(
m_groupIds
.
begin
(),
m_groupIds
.
end
(),
std
::
inserter
(
roots
,
roots
.
begin
()),
[
&
](
decltype
(
*
m_groupIds
.
begin
())
g
)
{
return
getRootId
(
g
.
first
);
});
[
&
](
decltype
(
*
m_groupIds
.
begin
())
g
)
{
const
int
parentId
=
getRootId
(
g
.
first
);
if
(
getType
(
parentId
)
==
GroupType
::
Selection
)
{
// Don't insert selection group, only its child groups
return
g
.
first
;
}
return
parentId
;
});
QJsonArray
list
;
for
(
int
r
:
roots
)
{
if
(
getType
(
r
)
!=
GroupType
::
Selection
)
list
.
push_back
(
toJson
(
r
));
list
.
push_back
(
toJson
(
r
));
}
QJsonDocument
json
(
list
);
return
QString
(
json
.
toJson
());
...
...
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