mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-15 00:43:13 +08:00
Merge branch '5.7' into 5.7-translations
This commit is contained in:
commit
af40ab5b01
@ -362,6 +362,10 @@ class WorkspaceDialog(QObject):
|
||||
def exportedSettingModel(self):
|
||||
return self._exported_settings_model
|
||||
|
||||
@pyqtProperty("QVariantList", notify=exportedSettingModelChanged)
|
||||
def exportedSettingModelItems(self):
|
||||
return self._exported_settings_model.items
|
||||
|
||||
@pyqtProperty(int, notify=exportedSettingModelChanged)
|
||||
def exportedSettingModelRowCount(self):
|
||||
return self._exported_settings_model.rowCount()
|
||||
|
@ -209,16 +209,9 @@ UM.Dialog
|
||||
{
|
||||
id: tableModel
|
||||
headers: ["category", "label", "value"]
|
||||
rows: manager.exportedSettingModel.items
|
||||
rows: manager.exportedSettingModelItems
|
||||
}
|
||||
}
|
||||
|
||||
property var modelRows: manager.exportedSettingModel.items
|
||||
onModelRowsChanged:
|
||||
{
|
||||
tableModel.clear()
|
||||
tableModel.rows = modelRows
|
||||
}
|
||||
}
|
||||
|
||||
comboboxVisible: manager.qualityChangesConflict
|
||||
|
@ -153,7 +153,8 @@ class SimulationPass(RenderPass):
|
||||
# In the current layer, we show just the indicated paths
|
||||
if layer == self._layer_view._current_layer_num:
|
||||
# We look for the position of the head, searching the point of the current path
|
||||
index = int(self._layer_view.getCurrentPath()) if self._layer_view.getCurrentPath() else 0
|
||||
index = int(self._layer_view.getCurrentPath()) if not math.isnan(
|
||||
self._layer_view.getCurrentPath()) else 0
|
||||
for polygon in layer_data.getLayer(layer).polygons:
|
||||
# The size indicates all values in the two-dimension array, and the second dimension is
|
||||
# always size 3 because we have 3D points.
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Copyright (c) 2021 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
import math
|
||||
import sys
|
||||
|
||||
from PyQt6.QtCore import Qt
|
||||
@ -216,7 +217,8 @@ class SimulationView(CuraView):
|
||||
Logger.warn(
|
||||
f"Binary search error (out of bounds): index {i}: left value {left_value} right value {right_value} and current time is {self._current_time}")
|
||||
|
||||
fractional_value = (self._current_time - left_value) / (right_value - left_value)
|
||||
segment_duration = right_value - left_value
|
||||
fractional_value = 0.0 if segment_duration == 0.0 else (self._current_time - left_value) / segment_duration
|
||||
|
||||
self.setPath(i + fractional_value)
|
||||
|
||||
|
@ -34,6 +34,15 @@ RecommendedSettingSection
|
||||
storeIndex: 0
|
||||
}
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: supportExtruderProvider
|
||||
key: "support_extruder_nr"
|
||||
containerStack: Cura.MachineManager.activeMachine
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: 0
|
||||
}
|
||||
|
||||
contents: [
|
||||
RecommendedSettingItem
|
||||
{
|
||||
@ -47,6 +56,8 @@ RecommendedSettingSection
|
||||
width: parent.width
|
||||
settingName: "support_structure"
|
||||
propertyRemoveUnusedValue: false
|
||||
updateAllExtruders: true
|
||||
defaultExtruderIndex: supportExtruderProvider.properties.value
|
||||
}
|
||||
},
|
||||
RecommendedSettingItem
|
||||
@ -75,6 +86,8 @@ RecommendedSettingSection
|
||||
{
|
||||
width: parent.width
|
||||
settingName: "support_type"
|
||||
updateAllExtruders: true
|
||||
defaultExtruderIndex: supportExtruderProvider.properties.value
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -28,7 +28,7 @@ Cura.ComboBox {
|
||||
id: comboboxModel
|
||||
|
||||
// The propertyProvider has not loaded the setting when this components onComplete triggers. Populating the model
|
||||
// is defered until propertyProvider signals "onIsValueUsedChanged". The defered upate is triggered with this function.
|
||||
// is deferred until propertyProvider signals "onIsValueUsedChanged". The deferred update is triggered with this function.
|
||||
function updateModel()
|
||||
{
|
||||
clear()
|
||||
@ -68,7 +68,8 @@ Cura.ComboBox {
|
||||
{
|
||||
id: propertyProvider
|
||||
containerStackId: updateAllExtruders ? Cura.ExtruderManager.extruderIds[defaultExtruderIndex] : Cura.MachineManager.activeMachine.id
|
||||
watchedProperties: ["value" , "options"]
|
||||
removeUnusedValue: false
|
||||
watchedProperties: ["value", "validationState", "resolve", "options"]
|
||||
}
|
||||
|
||||
Connections
|
||||
|
@ -34,7 +34,8 @@ UM.Slider
|
||||
{
|
||||
id: propertyProvider
|
||||
containerStackId: updateAllExtruders ? Cura.ExtruderManager.extruderIds[defaultExtruderIndex] : Cura.MachineManager.activeMachine.id
|
||||
watchedProperties: ["value"]
|
||||
watchedProperties: ["value", "validationState", "resolve"]
|
||||
removeUnusedValue: false
|
||||
storeIndex: 0
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ UM.TextField
|
||||
{
|
||||
id: propertyProvider
|
||||
watchedProperties: ["value", "validationState", "resolve"]
|
||||
removeUnusedValue: false
|
||||
containerStackId: updateAllExtruders ? Cura.ExtruderManager.extruderIds[defaultExtruderIndex] : Cura.MachineManager.activeMachine.id
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user