mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 04:15:12 +08:00
Apply suggestions from code review
This commit is contained in:
parent
bcdfa808a8
commit
91170e0aef
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2022 UltiMaker B.V.
|
// Copyright (c) 2022 UltiMaker
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
|
@ -22,7 +22,8 @@ Cura.ComboBox {
|
|||||||
// This is only used if updateAllExtruders == true
|
// This is only used if updateAllExtruders == true
|
||||||
property int defaultExtruderIndex: 0
|
property int defaultExtruderIndex: 0
|
||||||
|
|
||||||
model: ListModel {
|
model: ListModel
|
||||||
|
{
|
||||||
id: comboboxModel
|
id: comboboxModel
|
||||||
|
|
||||||
// The propertyProvider has not loaded the setting when this components onComplete triggers. Populating the model
|
// The propertyProvider has not loaded the setting when this components onComplete triggers. Populating the model
|
||||||
|
@ -62,8 +62,14 @@ RowLayout
|
|||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: propertyProvider
|
target: propertyProvider
|
||||||
function onContainerStackChanged() { updateTimer.restart() }
|
function onContainerStackChanged()
|
||||||
function onIsValueUsedChanged() { updateTimer.restart() }
|
{
|
||||||
|
comboboxModel.updateModel()
|
||||||
|
}
|
||||||
|
function onIsValueUsedChanged()
|
||||||
|
{
|
||||||
|
comboboxModel.updateModel()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates to the setting are delayed by interval. This reduces lag by waiting a bit after a setting change to update the slider contents.
|
// Updates to the setting are delayed by interval. This reduces lag by waiting a bit after a setting change to update the slider contents.
|
||||||
|
@ -59,8 +59,14 @@ UM.TextField
|
|||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: propertyProvider
|
target: propertyProvider
|
||||||
function onContainerStackChanged() { updateTimer.restart() }
|
function onContainerStackChanged()
|
||||||
function onIsValueUsedChanged() { updateTimer.restart() }
|
{
|
||||||
|
updateTimer.restart()
|
||||||
|
}
|
||||||
|
function onIsValueUsedChanged()
|
||||||
|
{
|
||||||
|
updateTimer.restart()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restart update timer right after releasing a key. This stops lag while typing, but you still get warning and error
|
// Restart update timer right after releasing a key. This stops lag while typing, but you still get warning and error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user