Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
f1fec81b
Commit
f1fec81b
authored
Mar 17, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash on close
parent
db9dfd1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+6
-3
src/timeline2/view/timelinecontroller.h
src/timeline2/view/timelinecontroller.h
+1
-0
No files found.
src/timeline2/view/timelinecontroller.cpp
View file @
f1fec81b
...
...
@@ -68,6 +68,7 @@ TimelineController::TimelineController(QObject *parent)
,
m_zone
(
-
1
,
-
1
)
,
m_scale
(
QFontMetrics
(
QApplication
::
font
()).
maxWidth
()
/
250
)
,
m_timelinePreview
(
nullptr
)
,
m_ready
(
false
)
{
m_disablePreview
=
pCore
->
currentDoc
()
->
getAction
(
QStringLiteral
(
"disable_preview"
));
connect
(
m_disablePreview
,
&
QAction
::
triggered
,
this
,
&
TimelineController
::
disablePreview
);
...
...
@@ -87,11 +88,12 @@ TimelineController::~TimelineController()
void
TimelineController
::
prepareClose
()
{
// Clear roor so we don't call its methods anymore
m_ready
=
false
;
m_root
=
nullptr
;
// Delete timeline preview before resetting model so that removing clips from timeline doesn't invalidate
delete
m_timelinePreview
;
m_timelinePreview
=
nullptr
;
// Clear roor so we don't call its methods anymore
m_root
=
nullptr
;
}
void
TimelineController
::
setModel
(
std
::
shared_ptr
<
TimelineItemModel
>
model
)
...
...
@@ -102,7 +104,7 @@ void TimelineController::setModel(std::shared_ptr<TimelineItemModel> model)
m_model
=
std
::
move
(
model
);
connect
(
m_model
.
get
(),
&
TimelineItemModel
::
requestClearAssetView
,
pCore
.
get
(),
&
Core
::
clearAssetPanel
);
connect
(
m_model
.
get
(),
&
TimelineItemModel
::
checkItemDeletion
,
[
this
]
(
int
id
)
{
if
(
m_r
oot
)
{
if
(
m_r
eady
)
{
QMetaObject
::
invokeMethod
(
m_root
,
"checkDeletion"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QVariant
,
id
));
}
});
...
...
@@ -155,6 +157,7 @@ std::shared_ptr<TimelineItemModel> TimelineController::getModel() const
void
TimelineController
::
setRoot
(
QQuickItem
*
root
)
{
m_root
=
root
;
m_ready
=
true
;
}
Mlt
::
Tractor
*
TimelineController
::
tractor
()
...
...
src/timeline2/view/timelinecontroller.h
View file @
f1fec81b
...
...
@@ -572,6 +572,7 @@ private:
QAction
*
m_disablePreview
;
std
::
shared_ptr
<
AudioCorrelation
>
m_audioCorrelator
;
QMutex
m_metaMutex
;
bool
m_ready
;
void
initializePreview
();
bool
darkBackground
()
const
;
...
...
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