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
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
7502d82e
Commit
7502d82e
authored
Dec 02, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash undoing cut when left part was selected
parent
4d325cbd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
1 deletion
+16
-1
src/timeline2/model/groupsmodel.cpp
src/timeline2/model/groupsmodel.cpp
+1
-0
src/timeline2/model/timelinefunctions.cpp
src/timeline2/model/timelinefunctions.cpp
+1
-1
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+9
-0
src/timeline2/model/timelinemodel.hpp
src/timeline2/model/timelinemodel.hpp
+5
-0
No files found.
src/timeline2/model/groupsmodel.cpp
View file @
7502d82e
...
...
@@ -148,6 +148,7 @@ Fun GroupsModel::destructGroupItem_lambda(int id)
removeFromGroup
(
id
);
auto
ptr
=
m_parent
.
lock
();
if
(
!
ptr
)
Q_ASSERT
(
false
);
ptr
->
clearGroupSelectionOnDelete
(
id
);
for
(
int
child
:
m_downLink
[
id
])
{
m_upLink
[
child
]
=
-
1
;
QModelIndex
ix
;
...
...
src/timeline2/model/timelinefunctions.cpp
View file @
7502d82e
...
...
@@ -266,7 +266,7 @@ bool TimelineFunctions::requestClipCut(const std::shared_ptr<TimelineItemModel>
int
newClip
=
timeline
->
getClipByPosition
(
trackToSelect
,
position
);
if
(
newClip
>
-
1
)
{
timeline
->
requestSetSelection
({
newClip
});
}
}
}
return
count
>
0
;
}
...
...
src/timeline2/model/timelinemodel.cpp
View file @
7502d82e
...
...
@@ -4878,6 +4878,15 @@ void TimelineModel::requestClearSelection(bool onDeletion, Fun &undo, Fun &redo)
}
}
void
TimelineModel
::
clearGroupSelectionOnDelete
(
int
gid
)
{
READ_LOCK
();
if
(
gid
==
m_currentSelection
)
{
requestClearSelection
(
true
);
}
}
std
::
unordered_set
<
int
>
TimelineModel
::
getCurrentSelection
()
const
{
READ_LOCK
();
...
...
src/timeline2/model/timelinemodel.hpp
View file @
7502d82e
...
...
@@ -689,6 +689,11 @@ public:
@param onDeletion is true when the selection is cleared as a result of a deletion
*/
Q_INVOKABLE
bool
requestClearSelection
(
bool
onDeletion
=
false
);
/** @brief On group deletion, ensure the group was not selected, clear selection otherwise
@param gid The group id
*/
void
clearGroupSelectionOnDelete
(
int
gid
);
// same function with undo/redo accumulation
void
requestClearSelection
(
bool
onDeletion
,
Fun
&
undo
,
Fun
&
redo
);
...
...
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