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
a6bff2f9
Commit
a6bff2f9
authored
Mar 05, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix crash on close.
Fixes
#571
parent
b7eb4d54
Pipeline
#16006
passed with stage
in 15 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core.cpp
View file @
a6bff2f9
...
...
@@ -122,11 +122,11 @@ void Core::build(bool isAppImage, const QString &MltPath)
void
Core
::
initGUI
(
const
QUrl
&
Url
,
const
QString
&
clipsToLoad
)
{
m_guiConstructed
=
true
;
m_profile
=
KdenliveSettings
::
default_profile
();
m_currentProfile
=
m_profile
;
profileChanged
();
m_mainWindow
=
new
MainWindow
();
m_guiConstructed
=
true
;
QStringList
styles
=
QQuickStyle
::
availableStyles
();
if
(
styles
.
contains
(
QLatin1String
(
"org.kde.desktop"
)))
{
QQuickStyle
::
setStyle
(
"org.kde.desktop"
);
...
...
@@ -695,13 +695,13 @@ std::shared_ptr<ProjectItemModel> Core::projectItemModel()
void
Core
::
invalidateRange
(
QSize
range
)
{
if
(
!
m_
mainWindow
||
m_mainWindow
->
getCurrentTimeline
()
->
loading
)
return
;
if
(
!
m_
guiConstructed
||
m_mainWindow
->
getCurrentTimeline
()
->
loading
)
return
;
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
invalidateZone
(
range
.
width
(),
range
.
height
());
}
void
Core
::
invalidateItem
(
ObjectId
itemId
)
{
if
(
!
m_
mainWindow
||
!
m_mainWindow
->
getCurrentTimeline
()
||
m_mainWindow
->
getCurrentTimeline
()
->
loading
)
return
;
if
(
!
m_
guiConstructed
||
!
m_mainWindow
->
getCurrentTimeline
()
||
m_mainWindow
->
getCurrentTimeline
()
->
loading
)
return
;
switch
(
itemId
.
first
)
{
case
ObjectType
::
TimelineClip
:
case
ObjectType
::
TimelineComposition
:
...
...
@@ -729,14 +729,14 @@ double Core::getClipSpeed(int id) const
void
Core
::
updateItemKeyframes
(
ObjectId
id
)
{
if
(
id
.
first
==
ObjectType
::
TimelineClip
&&
m_
mainWindow
)
{
if
(
id
.
first
==
ObjectType
::
TimelineClip
&&
m_
guiConstructed
)
{
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
updateClip
(
id
.
second
,
{
TimelineModel
::
KeyframesRole
});
}
}
void
Core
::
updateItemModel
(
ObjectId
id
,
const
QString
&
service
)
{
if
(
m_
mainWindow
&&
id
.
first
==
ObjectType
::
TimelineClip
&&
!
m_mainWindow
->
getCurrentTimeline
()
->
loading
&&
service
.
startsWith
(
QLatin1String
(
"fade"
)))
{
if
(
m_
guiConstructed
&&
id
.
first
==
ObjectType
::
TimelineClip
&&
!
m_mainWindow
->
getCurrentTimeline
()
->
loading
&&
service
.
startsWith
(
QLatin1String
(
"fade"
)))
{
bool
startFade
=
service
==
QLatin1String
(
"fadein"
)
||
service
==
QLatin1String
(
"fade_from_black"
);
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
updateClip
(
id
.
second
,
{
startFade
?
TimelineModel
::
FadeInRole
:
TimelineModel
::
FadeOutRole
});
}
...
...
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