Add sync button to SequencePlayer

Synchronisation available for ImageGallery, SequencePlayer and Viewer3D
This commit is contained in:
Aurore LAFAURIE 2024-04-03 15:34:53 +02:00 committed by Candice Bentéjac
parent f79021fa54
commit ca4f7f13e5

View file

@ -54,7 +54,7 @@ FloatingPane {
}
onPlayingChanged: {
syncSelected = !playing;
syncSelected = syncButton.checked || !playing;
if(playing && (frame + 1 >= sortedViewIds.length))
{
frame = 0;
@ -255,6 +255,22 @@ FloatingPane {
m.repeat = checked;
}
}
MaterialToolButton {
id: syncButton
checkable: true
checked: false
text: MaterialIcons.sync
ToolTip.text: "Sync Viewers and Sequence Player"
onCheckedChanged: {
// if playing, update the syncSelected property
if (m.playing) {
m.syncSelected = checked;
}
}
}
}
TextMetrics {