Commit cb1bf9a0 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(mainWindow/contact): view in progress

parent d67d8116
...@@ -18,11 +18,8 @@ RowLayout { ...@@ -18,11 +18,8 @@ RowLayout {
Layout.preferredHeight: 16 Layout.preferredHeight: 16
Layout.preferredWidth: 16 Layout.preferredWidth: 16
onClicked: { onClicked: {
console.log(valuesModel.get(valuesModel.count - 1).$value.length)
if (valuesModel.count === 0 || if (valuesModel.count === 0 ||
valuesModel.get(valuesModel.count - 1).$value.length !== 0 valuesModel.get(valuesModel.count - 1).$value.length !== 0) {
) {
valuesModel.append({ $value: '' }) valuesModel.append({ $value: '' })
} }
} }
...@@ -60,7 +57,8 @@ RowLayout { ...@@ -60,7 +57,8 @@ RowLayout {
color: textEdit.focus ? '#E6E6E6' : 'transparent' color: textEdit.focus ? '#E6E6E6' : 'transparent'
id: background id: background
implicitHeight: textEdit.height implicitHeight: textEdit.height
implicitWidth: textEdit.contentWidth + textEdit.padding * 2 implicitWidth: textEdit.contentWidth +
textEdit.padding * 2
} }
Text { Text {
...@@ -92,6 +90,10 @@ RowLayout { ...@@ -92,6 +90,10 @@ RowLayout {
onEditingFinished: { onEditingFinished: {
if (text.length === 0) { if (text.length === 0) {
valuesModel.remove(index) valuesModel.remove(index)
} else {
// textEdit.text is not the same value than
// valuesModel.get(index)
valuesModel.set(index, { $value: text })
} }
// Hack: The edition is finished but the focus // Hack: The edition is finished but the focus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment