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
0a50a0a9
Commit
0a50a0a9
authored
Mar 11, 2020
by
Jean-Baptiste Mardelle
Browse files
Ensure parent is expanded when making action on a clip
parent
e7638efd
Pipeline
#16321
passed with stage
in 14 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/bin.cpp
View file @
0a50a0a9
...
...
@@ -1705,6 +1705,8 @@ void Bin::slotAddFolder()
// Edit folder name
auto
folder
=
m_itemModel
->
getFolderByBinId
(
newId
);
auto
ix
=
m_itemModel
->
getIndexFromItem
(
folder
);
// Scroll to ensure folder is visible
m_itemView
->
scrollTo
(
m_proxyModel
->
mapFromSource
(
ix
),
QAbstractItemView
::
PositionAtCenter
);
qDebug
()
<<
"selecting"
<<
ix
;
if
(
ix
.
isValid
())
{
qDebug
()
<<
"ix valid"
;
...
...
@@ -2415,6 +2417,12 @@ void Bin::selectClip(const std::shared_ptr<ProjectClip> &clip)
if
(
id
.
isValid
()
&&
id2
.
isValid
())
{
m_proxyModel
->
selectionModel
()
->
select
(
QItemSelection
(
m_proxyModel
->
mapFromSource
(
id
),
m_proxyModel
->
mapFromSource
(
id2
)),
QItemSelectionModel
::
SelectCurrent
);
}
// Ensure parent folder is expanded
if
(
m_listType
==
BinTreeView
)
{
// Make sure parent folder is expanded
auto
*
view
=
static_cast
<
QTreeView
*>
(
m_itemView
);
view
->
expand
(
m_proxyModel
->
mapFromSource
(
ix
.
parent
()));
}
m_itemView
->
scrollTo
(
m_proxyModel
->
mapFromSource
(
ix
),
QAbstractItemView
::
PositionAtCenter
);
}
...
...
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