Skip to content

Commit ee68e3e

Browse files
committed
1 parent 0e8ec55 commit ee68e3e

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/models/multitrackmodel.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2291,6 +2291,7 @@ void MultitrackModel::filterAddedOrRemoved(Mlt::Producer *producer)
22912291
QVector<int> roles;
22922292
roles << FadeInRole;
22932293
roles << FadeOutRole;
2294+
roles << IsFilteredRole;
22942295
emit dataChanged(modelIndex, modelIndex, roles);
22952296
}
22962297
} else

src/qml/views/timeline/Clip.qml

+24
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Rectangle {
3131
property bool isBlank: false
3232
property bool isAudio: false
3333
property bool isTransition: false
34+
property bool isFiltered: false
3435
property var audioLevels
3536
property int fadeIn: 0
3637
property int fadeOut: 0
@@ -425,6 +426,29 @@ Rectangle {
425426
}
426427
}
427428

429+
ToolButton {
430+
visible: !elided && !isBlank && parent.height > 20 && isFiltered
431+
icon.name: 'view-filter'
432+
icon.source: 'qrc:///icons/oxygen/32x32/status/view-filter.png'
433+
icon.width: 16
434+
icon.height: 16
435+
anchors.left: parent.left
436+
anchors.bottom: parent.bottom
437+
anchors.bottomMargin: 4
438+
anchors.leftMargin: 4
439+
width: 20
440+
height: 20
441+
padding: 1
442+
focusPolicy: Qt.NoFocus
443+
onClicked: {
444+
clipRoot.clicked(clipRoot, null);
445+
timeline.filteredClicked();
446+
}
447+
Shotcut.HoverTip {
448+
text: qsTr('Filters')
449+
}
450+
}
451+
428452
Shotcut.TimelineTriangle {
429453
id: fadeInTriangle
430454

src/qml/views/timeline/Track.qml

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Rectangle {
8686
isBlank: typeof model.blank !== 'undefined' ? model.blank : false
8787
isAudio: typeof model.audio !== 'undefined' ? model.audio : false
8888
isTransition: typeof model.isTransition !== 'undefined' ? model.isTransition : false
89+
isFiltered: typeof model.filtered !== 'undefined' ? model.filtered : false
8990
audioLevels: typeof model.audioLevels !== 'undefined' ? model.audioLevels : ""
9091
width: typeof model.duration !== 'undefined' ? model.duration * timeScale : 0
9192
height: trackRoot.height

0 commit comments

Comments
 (0)