trying to fix models
This commit is contained in:
parent
a1f18f803d
commit
b61e05a423
6 changed files with 20 additions and 28 deletions
|
@ -206,7 +206,7 @@ Item {
|
|||
}
|
||||
|
||||
function addVideo(url) {
|
||||
videoProxyModel.videoModel.newItem(url);
|
||||
videoModel.newItem(url);
|
||||
selectedLibrary = "video";
|
||||
videoLibrary.libraryList.currentIndex = videoProxyModel.videoModel.count - 1;
|
||||
if (!editMode)
|
||||
|
@ -215,7 +215,7 @@ Item {
|
|||
}
|
||||
|
||||
function addImg(url) {
|
||||
imageProxyModel.newItem(url);
|
||||
imageModel.newItem(url);
|
||||
selectedLibrary = "image";
|
||||
imageLibrary.libraryList.currentIndex = imageProxyModel.imageModel.count - 1;
|
||||
if (!editMode)
|
||||
|
@ -249,7 +249,8 @@ Item {
|
|||
}
|
||||
|
||||
function isDragFile(item) {
|
||||
var extension = item.split('.').pop();
|
||||
console.log(item.toString());
|
||||
var extension = item.toString().split('.').pop();
|
||||
var valid = false;
|
||||
|
||||
if(extension) {
|
||||
|
@ -261,7 +262,7 @@ Item {
|
|||
}
|
||||
|
||||
function addFile(file) {
|
||||
let extension = file.split('.').pop();
|
||||
let extension = file.toString().split('.').pop();
|
||||
if (videoexts.includes(extension))
|
||||
{
|
||||
addVideo(file);
|
||||
|
@ -281,7 +282,7 @@ Item {
|
|||
showPassiveNotification("More than one file");
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let file = files[i];
|
||||
let ext = file.split('.').pop()
|
||||
let ext = file.toString().split('.').pop()
|
||||
if (videoexts.includes(ext))
|
||||
{
|
||||
addVideo(file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue