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
9f2b8cd9
Commit
9f2b8cd9
authored
Dec 28, 2019
by
Jean-Baptiste Mardelle
Browse files
Add sort by insert order
Related to
#287
parent
75c79f6c
Pipeline
#12572
passed with stage
in 21 minutes and 52 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/abstractprojectitem.cpp
View file @
9f2b8cd9
...
...
@@ -221,7 +221,7 @@ QVariant AbstractProjectItem::getData(DataType type) const
int
AbstractProjectItem
::
supportedDataCount
()
const
{
return
6
;
return
7
;
}
QString
AbstractProjectItem
::
name
()
const
...
...
src/bin/bin.cpp
View file @
9f2b8cd9
...
...
@@ -883,10 +883,15 @@ Bin::Bin(std::shared_ptr<ProjectItemModel> model, QWidget *parent)
sortByDuration
->
setCheckable
(
true
);
sortByDuration
->
setData
(
5
);
sortByDuration
->
setChecked
(
binSort
==
5
);
QAction
*
sortByInsert
=
new
QAction
(
i18n
(
"Insert Order"
),
m_sortGroup
);
sortByInsert
->
setCheckable
(
true
);
sortByInsert
->
setData
(
6
);
sortByInsert
->
setChecked
(
binSort
==
6
);
sort
->
addAction
(
sortByName
);
sort
->
addAction
(
sortByDate
);
sort
->
addAction
(
sortByDuration
);
sort
->
addAction
(
sortByType
);
sort
->
addAction
(
sortByInsert
);
sort
->
addAction
(
sortByDesc
);
sort
->
addSeparator
();
sort
->
addAction
(
m_sortDescend
);
...
...
src/bin/projectitemmodel.cpp
View file @
9f2b8cd9
...
...
@@ -97,6 +97,9 @@ int ProjectItemModel::mapToColumn(int column) const
case
5
:
return
AbstractProjectItem
::
DataDuration
;
break
;
case
6
:
return
AbstractProjectItem
::
DataId
;
break
;
default:
return
AbstractProjectItem
::
DataName
;
}
...
...
@@ -257,6 +260,9 @@ QVariant ProjectItemModel::headerData(int section, Qt::Orientation orientation,
case
5
:
columnName
=
i18n
(
"Duration"
);
break
;
case
6
:
columnName
=
i18n
(
"Id"
);
break
;
default:
columnName
=
i18n
(
"Unknown"
);
break
;
...
...
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