mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Apply suggestions from code review
This commit is contained in:
parent
bcdfa808a8
commit
91170e0aef
4 changed files with 19 additions and 6 deletions
|
@ -22,7 +22,8 @@ Cura.ComboBox {
|
|||
// This is only used if updateAllExtruders == true
|
||||
property int defaultExtruderIndex: 0
|
||||
|
||||
model: ListModel {
|
||||
model: ListModel
|
||||
{
|
||||
id: comboboxModel
|
||||
|
||||
// The propertyProvider has not loaded the setting when this components onComplete triggers. Populating the model
|
||||
|
|
|
@ -62,8 +62,14 @@ RowLayout
|
|||
Connections
|
||||
{
|
||||
target: propertyProvider
|
||||
function onContainerStackChanged() { updateTimer.restart() }
|
||||
function onIsValueUsedChanged() { updateTimer.restart() }
|
||||
function onContainerStackChanged()
|
||||
{
|
||||
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.
|
||||
|
|
|
@ -59,8 +59,14 @@ UM.TextField
|
|||
Connections
|
||||
{
|
||||
target: propertyProvider
|
||||
function onContainerStackChanged() { updateTimer.restart() }
|
||||
function onIsValueUsedChanged() { updateTimer.restart() }
|
||||
function onContainerStackChanged()
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue