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
86588bc2
Commit
86588bc2
authored
May 04, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix loading of clip zones
parent
395445be
Pipeline
#3082
passed with stage
in 20 minutes and 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
86588bc2
...
...
@@ -111,7 +111,7 @@ std::shared_ptr<ProjectClip> ProjectClip::construct(const QString &id, const QIc
{
std
::
shared_ptr
<
ProjectClip
>
self
(
new
ProjectClip
(
id
,
thumb
,
model
,
producer
));
baseFinishConstruct
(
self
);
model
->
loadSubClips
(
id
,
self
->
getPropertiesFromPrefix
(
QStringLiteral
(
"kdenlive:clipzone."
)));
QMetaObject
::
invokeMethod
(
model
.
get
(),
"loadSubClips"
,
Qt
::
QueuedConnection
,
Q_ARG
(
const
QString
&
,
id
),
Q_ARG
(
const
stringMap
&
,
self
->
getPropertiesFromPrefix
(
QStringLiteral
(
"kdenlive:clipzone."
)))
)
;
return
self
;
}
...
...
src/bin/projectitemmodel.cpp
View file @
86588bc2
...
...
@@ -457,19 +457,20 @@ std::shared_ptr<ProjectFolder> ProjectItemModel::getRootFolder() const
return
std
::
static_pointer_cast
<
ProjectFolder
>
(
rootItem
);
}
void
ProjectItemModel
::
loadSubClips
(
const
QString
&
id
,
const
QMap
<
QString
,
QString
>
&
dataMap
)
void
ProjectItemModel
::
loadSubClips
(
const
QString
&
id
,
const
stringMap
&
clipData
)
{
QWriteLocker
locker
(
&
m_lock
);
Fun
undo
=
[]()
{
return
true
;
};
Fun
redo
=
[]()
{
return
true
;
};
loadSubClips
(
id
,
dataMap
,
undo
,
redo
);
loadSubClips
(
id
,
clipData
,
undo
,
redo
);
}
void
ProjectItemModel
::
loadSubClips
(
const
QString
&
id
,
const
QMap
<
QString
,
QString
>
&
dataMap
,
Fun
&
undo
,
Fun
&
redo
)
void
ProjectItemModel
::
loadSubClips
(
const
QString
&
id
,
const
stringMap
&
dataMap
,
Fun
&
undo
,
Fun
&
redo
)
{
QWriteLocker
locker
(
&
m_lock
);
std
::
shared_ptr
<
ProjectClip
>
clip
=
getClipByBinID
(
id
);
if
(
!
clip
)
{
qDebug
()
<<
" = = = = = CLIP NOT LOADED"
;
return
;
}
QMapIterator
<
QString
,
QString
>
i
(
dataMap
);
...
...
src/bin/projectitemmodel.h
View file @
86588bc2
...
...
@@ -98,11 +98,7 @@ public:
/** @brief Convenience method to access root folder */
std
::
shared_ptr
<
ProjectFolder
>
getRootFolder
()
const
;
/** @brief Create the subclips defined in the parent clip.
@param id is the id of the parent clip
@param data is a definition of the subclips (keys are subclips' names, value are "in:out")*/
void
loadSubClips
(
const
QString
&
id
,
const
QMap
<
QString
,
QString
>
&
data
);
void
loadSubClips
(
const
QString
&
id
,
const
QMap
<
QString
,
QString
>
&
dataMap
,
Fun
&
undo
,
Fun
&
redo
);
void
loadSubClips
(
const
QString
&
id
,
const
stringMap
&
dataMap
,
Fun
&
undo
,
Fun
&
redo
);
/* @brief Convenience method to retrieve a pointer to an element given its index */
std
::
shared_ptr
<
AbstractProjectItem
>
getBinItemByIndex
(
const
QModelIndex
&
index
)
const
;
...
...
@@ -231,6 +227,10 @@ public slots:
/** @brief Check whether a given id is currently used or not*/
bool
isIdFree
(
const
QString
&
id
)
const
;
void
setDragType
(
PlaylistState
::
ClipState
type
);
/** @brief Create the subclips defined in the parent clip.
@param id is the id of the parent clip
@param data is a definition of the subclips (keys are subclips' names, value are "in:out")*/
void
loadSubClips
(
const
QString
&
id
,
const
stringMap
&
clipData
);
private:
/** @brief Return reference to column specific data */
...
...
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