Fix adding duplicate stickers and strip file extension

This commit is contained in:
Nicolas Werner 2023-05-19 22:39:03 +02:00
parent ab5f176de0
commit 4bf725379a
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 32 additions and 8 deletions

View file

@ -255,8 +255,13 @@ ApplicationWindow {
Layout.fillWidth: true
Layout.columnSpan: 2
label: qsTr("Shortcode")
text: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
onTextEdited: imagePack.setData(imagePack.index(currentImageIndex, 0), text, SingleImagePackModel.ShortCode)
property int bindingCounter: 0
text: bindingCounter, imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.ShortCode)
onTextEdited: {
imagePack.setData(imagePack.index(currentImageIndex, 0), text, SingleImagePackModel.ShortCode);
// force text field to update in case the model disagreed with the new value.
bindingCounter++;
}
}
MatrixTextField {