maintenance: cleanup of switching to editMode
This commit is contained in:
parent
a8eec1dee6
commit
3a3c4f9c5c
3 changed files with 7 additions and 9 deletions
|
@ -47,8 +47,7 @@ Item {
|
||||||
libraryList.currentIndex = songProxyModel.songModel.rowCount() - 1;
|
libraryList.currentIndex = songProxyModel.songModel.rowCount() - 1;
|
||||||
if (!editMode)
|
if (!editMode)
|
||||||
editMode = true;
|
editMode = true;
|
||||||
editType = "song";
|
editSwitch(libraryList.currentIndex, "song");
|
||||||
editSwitch(libraryList.currentIndex);
|
|
||||||
})
|
})
|
||||||
deleteItemFunction: (function(rows) {
|
deleteItemFunction: (function(rows) {
|
||||||
songProxyModel.deleteSongs(rows)
|
songProxyModel.deleteSongs(rows)
|
||||||
|
@ -301,7 +300,7 @@ Item {
|
||||||
showPassiveNotification("newest video: " + video.title);
|
showPassiveNotification("newest video: " + video.title);
|
||||||
if (!editMode)
|
if (!editMode)
|
||||||
editMode = true;
|
editMode = true;
|
||||||
editSwitch("video", video);
|
editSwitch(video, "video");
|
||||||
}
|
}
|
||||||
|
|
||||||
function addImg(url) {
|
function addImg(url) {
|
||||||
|
@ -313,7 +312,7 @@ Item {
|
||||||
showPassiveNotification("newest image: " + image.title);
|
showPassiveNotification("newest image: " + image.title);
|
||||||
if (!editMode)
|
if (!editMode)
|
||||||
editMode = true;
|
editMode = true;
|
||||||
editSwitch("image", image);
|
editSwitch(image, "image");
|
||||||
}
|
}
|
||||||
|
|
||||||
function addPres(url) {
|
function addPres(url) {
|
||||||
|
@ -333,7 +332,7 @@ Item {
|
||||||
showPassiveNotification("newest image: " + presentation.title);
|
showPassiveNotification("newest image: " + presentation.title);
|
||||||
if (!editMode)
|
if (!editMode)
|
||||||
editMode = true;
|
editMode = true;
|
||||||
editSwitch("presentation", presentation);
|
editSwitch(presentation, "presentation");
|
||||||
pdf.source = "";
|
pdf.source = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -349,8 +349,7 @@ ColumnLayout {
|
||||||
libraryList.currentIndex = index;
|
libraryList.currentIndex = index;
|
||||||
if (!editMode)
|
if (!editMode)
|
||||||
editMode = true;
|
editMode = true;
|
||||||
editType = libraryType;
|
editSwitch(index, libraryType);
|
||||||
editSwitch(index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,9 +201,9 @@ Controls.Page {
|
||||||
pWindow.loopVideo();
|
pWindow.loopVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
function editSwitch(item) {
|
function editSwitch(item, mode) {
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
switch (editType) {
|
switch (mode) {
|
||||||
case "song" :
|
case "song" :
|
||||||
presentation.visible = false;
|
presentation.visible = false;
|
||||||
videoEditor.visible = false;
|
videoEditor.visible = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue