Merge branch 'master' of github.com:Ultimaker/Cura into qtquick-controls-2.0

This commit is contained in:
Jaime van Kessel 2017-11-16 16:48:22 +01:00
commit 7d28b26ff2
446 changed files with 4278 additions and 1340 deletions

View file

@ -11,6 +11,14 @@ SettingItem
id: base
property var focusItem: input
property string textBeforeEdit
property bool textHasChanged
onFocusReceived:
{
textHasChanged = false;
textBeforeEdit = focusItem.text;
}
contents: Rectangle
{
id: control
@ -102,6 +110,7 @@ SettingItem
right: parent.right
verticalCenter: parent.verticalCenter
}
renderType: Text.NativeRendering
Keys.onTabPressed:
{
@ -114,12 +123,22 @@ SettingItem
Keys.onReleased:
{
propertyProvider.setPropertyValue("value", text)
if (text != textBeforeEdit)
{
textHasChanged = true;
}
if (textHasChanged)
{
propertyProvider.setPropertyValue("value", text)
}
}
onEditingFinished:
{
propertyProvider.setPropertyValue("value", text)
if (textHasChanged)
{
propertyProvider.setPropertyValue("value", text)
}
}
onActiveFocusChanged: