Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions meshroom/ui/qml/Viewer/SequencePlayer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ FloatingPane {
ToolTip.text: "Previous Frame"

onClicked: {
m.frame -= 1;
if (m.frame > 0) {
m.frame -= 1;
}
}
}

Expand Down Expand Up @@ -161,7 +163,9 @@ FloatingPane {
ToolTip.text: "Next Frame"

onClicked: {
m.frame += 1;
if (m.frame < sortedViewIds.length - 1) {
m.frame += 1;
}
}
}

Expand Down Expand Up @@ -197,7 +201,9 @@ FloatingPane {
ToolTip.text: "Previous Frame"

onClicked: {
m.frame -= 1;
if (m.frame > 0) {
m.frame -= 1;
}
}
}

Expand All @@ -213,7 +219,9 @@ FloatingPane {
Layout.preferredWidth: frameMetrics.width

onEditingFinished: {
m.frame = parseInt(text);
// We first assign the frame to the entered text even if it is an invalid frame number. We do it for extreme cases, for example without doing it, if we are at 0, and put a negative number, m.frame would be still 0 and nothing happens but we will still see the wrong number
m.frame = parseInt(text)
m.frame = Math.min((sortedViewIds.length - 1), Math.max(0, parseInt(text)));
focus = false;
}
}
Expand All @@ -230,7 +238,9 @@ FloatingPane {
ToolTip.text: "Next Frame"

onClicked: {
m.frame += 1;
if (m.frame < sortedViewIds.length - 1) {
m.frame += 1;
}
}
}
}
Expand Down