bug: fixing video issues between qml and rust
This commit is contained in:
parent
82466ee6fc
commit
bb9fc3fd86
2 changed files with 8 additions and 5 deletions
|
@ -237,7 +237,7 @@ Item {
|
|||
}
|
||||
|
||||
function changeVideo(index) {
|
||||
let vid = videoProxyModel.getVideo(index);
|
||||
let vid = videoProxyModel.videoModel.getItem(index);
|
||||
root.video = vid;
|
||||
console.log(video.startTime);
|
||||
console.log(video.endTime);
|
||||
|
@ -253,24 +253,24 @@ Item {
|
|||
}
|
||||
|
||||
function updateEndTime(value) {
|
||||
videoProxyModel.updateEndTime(video.id, Math.min(value, videoPreview.duration));
|
||||
videoProxyModel.videoModel.updateEndTime(video.id, Math.min(value, videoPreview.duration));
|
||||
video.endTime = value;
|
||||
}
|
||||
|
||||
function updateStartTime(value) {
|
||||
videoProxyModel.updateStartTime(video.id, Math.max(value, 0));
|
||||
videoProxyModel.videoModel.updateStartTime(video.id, Math.max(value, 0));
|
||||
video.startTime = value;
|
||||
}
|
||||
|
||||
function updateTitle(text) {
|
||||
changeTitle(text, false);
|
||||
videoProxyModel.updateTitle(video.id, text);
|
||||
videoProxyModel.videoModel.updateTitle(video.id, text);
|
||||
/* showPassiveNotification(video.title); */
|
||||
}
|
||||
|
||||
function updateLoop(value) {
|
||||
/* changeStartTime(value, false); */
|
||||
let bool = videoProxyModel.updateLoop(video.id, value);
|
||||
let bool = videoProxyModel.videoModel.updateLoop(video.id, value);
|
||||
if (bool)
|
||||
video.loop = value;
|
||||
/* showPassiveNotification("Loop changed to: " + video.loop); */
|
||||
|
|
|
@ -370,9 +370,12 @@ mod video_model {
|
|||
.filter(|x| x.id == index)
|
||||
{
|
||||
video.title = updated_title.clone();
|
||||
println!("rust-title: {:?}", video.title);
|
||||
}
|
||||
// TODO this seems to not be updating in the actual list
|
||||
self.as_mut()
|
||||
.emit_data_changed(model_index, model_index, &vector_roles);
|
||||
// self.as_mut().emit_title_changed();
|
||||
println!("rust-title: {:?}", updated_title);
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue