fixing images not updating after items being deleted in middle
This commit is contained in:
parent
893c32ea6f
commit
cf15949347
2 changed files with 41 additions and 9 deletions
|
@ -123,10 +123,10 @@ Item {
|
|||
Layout.leftMargin: 20
|
||||
Layout.rightMargin: 20
|
||||
|
||||
placeholderText: "Song Title..."
|
||||
placeholderText: "Image Title..."
|
||||
text: image.title
|
||||
padding: 10
|
||||
/* onEditingFinished: updateTitle(text); */
|
||||
onEditingFinished: updateTitle(text);
|
||||
}
|
||||
|
||||
Item {
|
||||
|
@ -166,4 +166,16 @@ Item {
|
|||
root.image = image;
|
||||
print(image.filePath.toString());
|
||||
}
|
||||
|
||||
function updateTitle(text) {
|
||||
changeTitle(text, false);
|
||||
imagesqlmodel.updateTitle(image.id, text);
|
||||
showPassiveNotification(image.title);
|
||||
}
|
||||
|
||||
function changeTitle(text, updateBox) {
|
||||
if (updateBox)
|
||||
imageTitleField.text = text;
|
||||
image.title = text;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue