Skip to content
GitLab
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
6fdc79fc
Commit
6fdc79fc
authored
Apr 13, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix crash trying to import keyframes in rotoscoping effect
Related to
#615
parent
1e2584e5
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/assets/view/widgets/keyframeimport.cpp
View file @
6fdc79fc
...
...
@@ -46,8 +46,7 @@
#include
"mlt++/MltProperties.h"
KeyframeImport
::
KeyframeImport
(
const
QString
&
animData
,
std
::
shared_ptr
<
AssetParameterModel
>
model
,
QList
<
QPersistentModelIndex
>
indexes
,
QWidget
*
parent
)
KeyframeImport
::
KeyframeImport
(
const
QString
&
animData
,
std
::
shared_ptr
<
AssetParameterModel
>
model
,
QList
<
QPersistentModelIndex
>
indexes
,
int
parentIn
,
int
parentDuration
,
QWidget
*
parent
)
:
QDialog
(
parent
)
,
m_model
(
std
::
move
(
model
))
,
m_indexes
(
indexes
)
...
...
@@ -141,7 +140,7 @@ KeyframeImport::KeyframeImport(const QString &animData, std::shared_ptr<AssetPar
// Zone in / out
in
=
qMax
(
0
,
in
);
if
(
out
<=
0
)
{
out
=
in
+
m_model
->
data
(
indexes
.
first
(),
AssetParameterModel
::
ParentDurationRole
).
toInt
()
;
out
=
in
+
parentDuration
;
}
m_inPoint
=
new
PositionWidget
(
i18n
(
"In"
),
in
,
0
,
out
,
pCore
->
currentDoc
()
->
timecode
(),
QString
(),
this
);
connect
(
m_inPoint
,
&
PositionWidget
::
valueChanged
,
this
,
&
KeyframeImport
::
updateDisplay
);
...
...
@@ -219,8 +218,8 @@ KeyframeImport::KeyframeImport(const QString &animData, std::shared_ptr<AssetPar
lay
->
addLayout
(
l1
);
// Output offset
int
clipIn
=
m_model
->
data
(
indexes
.
first
(),
AssetParameterModel
::
ParentInRole
).
toInt
()
;
m_offsetPoint
=
new
PositionWidget
(
i18n
(
"Offset"
),
clipIn
,
0
,
clipIn
+
m_model
->
data
(
indexes
.
first
(),
AssetParameterModel
::
ParentDurationRole
).
toInt
()
,
pCore
->
currentDoc
()
->
timecode
(),
""
,
this
);
int
clipIn
=
parentIn
;
m_offsetPoint
=
new
PositionWidget
(
i18n
(
"Offset"
),
clipIn
,
0
,
clipIn
+
parentDuration
,
pCore
->
currentDoc
()
->
timecode
(),
""
,
this
);
lay
->
addWidget
(
m_offsetPoint
);
// Source range
...
...
src/assets/view/widgets/keyframeimport.h
View file @
6fdc79fc
...
...
@@ -42,8 +42,7 @@ class KeyframeImport : public QDialog
{
Q_OBJECT
public:
explicit
KeyframeImport
(
const
QString
&
animData
,
std
::
shared_ptr
<
AssetParameterModel
>
model
,
QList
<
QPersistentModelIndex
>
indexes
,
QWidget
*
parent
=
nullptr
);
explicit
KeyframeImport
(
const
QString
&
animData
,
std
::
shared_ptr
<
AssetParameterModel
>
model
,
QList
<
QPersistentModelIndex
>
indexes
,
int
parentIn
,
int
parentDuration
,
QWidget
*
parent
=
nullptr
);
~
KeyframeImport
()
override
;
QString
selectedData
()
const
;
void
importSelectedData
();
...
...
src/assets/view/widgets/keyframewidget.cpp
View file @
6fdc79fc
...
...
@@ -491,7 +491,7 @@ void KeyframeWidget::slotImportKeyframes()
for
(
const
auto
&
w
:
m_parameters
)
{
indexes
<<
w
.
first
;
}
QPointer
<
KeyframeImport
>
import
=
new
KeyframeImport
(
values
,
m_model
,
indexes
,
this
);
QPointer
<
KeyframeImport
>
import
=
new
KeyframeImport
(
values
,
m_model
,
indexes
,
m_model
->
data
(
m_index
,
AssetParameterModel
::
ParentInRole
).
toInt
(),
m_model
->
data
(
m_index
,
AssetParameterModel
::
ParentDurationRole
).
toInt
(),
this
);
if
(
import
->
exec
()
!=
QDialog
::
Accepted
)
{
delete
import
;
return
;
...
...
src/monitor/view/kdenlivemonitorrotoscene.qml
View file @
6fdc79fc
...
...
@@ -335,7 +335,7 @@ Item {
Text
{
id
:
label
text
:
i18n
(
"
Click to add points,
\n
right click to close shape.
"
)
font
:
mini
Font
font
:
fixed
Font
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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