mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into qtquick-controls-2.0
This commit is contained in:
commit
7d28b26ff2
446 changed files with 4278 additions and 1340 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue