diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 6a180593c5..42784e4e38 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -165,7 +165,7 @@ class MachineManager(QObject): # Save the material that needs to be changed. Multiple changes will be handled by the callback. self._auto_materials_changed[str(index)] = containers[0].getId() Application.getInstance().messageBox(catalog.i18nc("@window:title", "Changes on the Printer"), catalog.i18nc("@label", "Do you want to change the materials and hotends to match the material in your printer?"), - catalog.i18nc("@label", "The materials and / or hotends on your printer were changed. For best results always slice for the materials . hotends that are inserted in your printer."), + catalog.i18nc("@label", "The materials and / or hotends on your printer were changed. For best results always slice for the materials and hotends that are inserted in your printer."), buttons = QMessageBox.Yes + QMessageBox.No, icon = QMessageBox.Question, callback = self._materialHotendChangedCallback) else: diff --git a/plugins/ChangeLogPlugin/ChangeLog.py b/plugins/ChangeLogPlugin/ChangeLog.py index d004104f91..b30cba4a8e 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.py +++ b/plugins/ChangeLogPlugin/ChangeLog.py @@ -68,6 +68,7 @@ class ChangeLog(Extension, QObject,): line = line.replace("[","") line = line.replace("]","") open_version = Version(line) + open_header = "" self._change_logs[open_version] = collections.OrderedDict() elif line.startswith("*"): open_header = line.replace("*","") diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py index e7295c3f97..b4086291ca 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingVisibilityHandler.py @@ -70,6 +70,7 @@ class PerObjectSettingVisibilityHandler(UM.Settings.Models.SettingVisibilityHand else: stack = UM.Application.getInstance().getGlobalContainerStack() new_instance.setProperty("value", stack.getProperty(item, "value")) + new_instance.resetState() # Ensure that the state is not seen as a user state. settings.addInstance(new_instance) visibility_changed = True else: diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 4f2d8e4272..0930ae568e 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -311,6 +311,15 @@ Item { property string labelFilter: "" + onVisibilityChanged: + { + // force updating the model to sync it with addedSettingsModel + if(visible) + { + listview.model.forceUpdate() + } + } + TextField { id: filter diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 7896892808..3e3501a83f 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -62,8 +62,11 @@ class SolidView(View): uniforms = {} if not multi_extrusion: - material = global_container_stack.findContainer({ "type": "material" }) - material_color = material.getMetaDataEntry("color_code", default = self._extruders_model.defaultColors[0]) if material else self._extruders_model.defaultColors[0] + if global_container_stack: + material = global_container_stack.findContainer({ "type": "material" }) + material_color = material.getMetaDataEntry("color_code", default = self._extruders_model.defaultColors[0]) if material else self._extruders_model.defaultColors[0] + else: + material_color = self._extruders_model.defaultColors[0] else: # Get color to render this mesh in from ExtrudersModel extruder_index = 0 diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index d7775ea62e..d0a459e561 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -186,7 +186,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): return programmer = stk500v2.Stk500v2() - programmer.progressCallback = self.setProgress + programmer.progress_callback = self.setProgress try: programmer.connect(self._serial_port) @@ -307,7 +307,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self.setConnectionState(ConnectionState.connected) self._listen_thread.start() # Start listening Logger.log("i", "Established printer connection on port %s" % self._serial_port) - return + return self._sendCommand("M105") # Send M105 as long as we are listening, otherwise we end up in an undefined state @@ -335,7 +335,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._connect_thread = threading.Thread(target = self._connect) self._connect_thread.daemon = True - + self.setConnectionState(ConnectionState.closed) if self._serial is not None: try: @@ -564,7 +564,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): ret = self._serial.readline() except Exception as e: Logger.log("e", "Unexpected error while reading serial port. %s" % e) - self._setErrorState("Printer has been disconnected") + self._setErrorState("Printer has been disconnected") self.close() return None return ret diff --git a/plugins/USBPrinting/avr_isp/stk500v2.py b/plugins/USBPrinting/avr_isp/stk500v2.py index 3960912e1d..afdb50553e 100644 --- a/plugins/USBPrinting/avr_isp/stk500v2.py +++ b/plugins/USBPrinting/avr_isp/stk500v2.py @@ -20,8 +20,8 @@ class Stk500v2(ispBase.IspBase): self.serial = None self.seq = 1 self.last_addr = -1 - self.progressCallback = None - + self.progress_callback = None + def connect(self, port = "COM22", speed = 115200): if self.serial is not None: self.close() @@ -69,7 +69,7 @@ class Stk500v2(ispBase.IspBase): self.serial = None return ret return None - + def isConnected(self): return self.serial is not None @@ -79,7 +79,7 @@ class Stk500v2(ispBase.IspBase): def sendISP(self, data): recv = self.sendMessage([0x1D, 4, 4, 0, data[0], data[1], data[2], data[3]]) return recv[2:6] - + def writeFlash(self, flash_data): #Set load addr to 0, in case we have more then 64k flash we need to enable the address extension page_size = self.chip["pageSize"] * 2 @@ -89,15 +89,15 @@ class Stk500v2(ispBase.IspBase): self.sendMessage([0x06, 0x80, 0x00, 0x00, 0x00]) else: self.sendMessage([0x06, 0x00, 0x00, 0x00, 0x00]) - load_count = (len(flash_data) + page_size - 1) / page_size + load_count = (len(flash_data) + page_size - 1) / page_size for i in range(0, int(load_count)): recv = self.sendMessage([0x13, page_size >> 8, page_size & 0xFF, 0xc1, 0x0a, 0x40, 0x4c, 0x20, 0x00, 0x00] + flash_data[(i * page_size):(i * page_size + page_size)]) - if self.progressCallback is not None: + if self.progress_callback is not None: if self._has_checksum: - self.progressCallback(i + 1, load_count) + self.progress_callback(i + 1, load_count) else: - self.progressCallback(i + 1, load_count * 2) - + self.progress_callback(i + 1, load_count * 2) + def verifyFlash(self, flash_data): if self._has_checksum: self.sendMessage([0x06, 0x00, (len(flash_data) >> 17) & 0xFF, (len(flash_data) >> 9) & 0xFF, (len(flash_data) >> 1) & 0xFF]) @@ -120,8 +120,8 @@ class Stk500v2(ispBase.IspBase): load_count = (len(flash_data) + 0xFF) / 0x100 for i in range(0, int(load_count)): recv = self.sendMessage([0x14, 0x01, 0x00, 0x20])[2:0x102] - if self.progressCallback is not None: - self.progressCallback(load_count + i + 1, load_count * 2) + if self.progress_callback is not None: + self.progress_callback(load_count + i + 1, load_count * 2) for j in range(0, 0x100): if i * 0x100 + j < len(flash_data) and flash_data[i * 0x100 + j] != recv[j]: raise ispBase.IspError("Verify error at: 0x%x" % (i * 0x100 + j)) @@ -141,7 +141,7 @@ class Stk500v2(ispBase.IspBase): raise ispBase.IspError("Serial send timeout") self.seq = (self.seq + 1) & 0xFF return self.recvMessage() - + def recvMessage(self): state = "Start" checksum = 0 diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index f781edc47e..380faa397e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1586,6 +1586,7 @@ "type": "int", "default_value": 2, "minimum_value": "0", + "maximum_value_warning": "1.0 / layer_height", "settable_per_mesh": false, "settable_per_extruder": false }, @@ -2747,6 +2748,16 @@ } } }, + "brim_outside_only": + { + "label": "Brim Only on Outside", + "description": "Only print the brim on the outside of the model. This reduces the amount of brim you need to remove afterwards, while it doesn't reduce the bed adhesion that much.", + "type": "bool", + "default_value": true, + "enabled": "adhesion_type == \"brim\"", + "settable_per_mesh": false, + "settable_per_extruder": true + }, "raft_margin": { "label": "Raft Extra Margin", @@ -3736,7 +3747,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "settable_per_mesh": false, @@ -3768,7 +3779,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.max(max_feedrate_z_override, machine_max_feedrate_z)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "value": "wireframe_printspeed", @@ -3784,7 +3795,7 @@ "type": "float", "default_value": 5, "minimum_value": "0.1", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2 + max(max_feedrate_z_override, machine_max_feedrate_z) ** 2)", "maximum_value_warning": "50", "enabled": "wireframe_enabled", "value": "wireframe_printspeed", diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 9064c4835f..78f184f13c 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -209,7 +209,7 @@ Rectangle { lengths = ["0.00"]; weights = ["0"]; } - return catalog.i18nc("@label", "%1 m / %2 g").arg(lengths.join(" + ")).arg(weights.join(" + ")); + return catalog.i18nc("@label", "%1 m / ~ %2 g").arg(lengths.join(" + ")).arg(weights.join(" + ")); } } } diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 4d05bef2b9..686a47ca47 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -100,7 +100,7 @@ SettingItem maximumLength: 10; - validator: RegExpValidator { regExp: (type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } //"type" property from parent loader used to disallow fractional number entry + validator: RegExpValidator { regExp: (definition.type == "int") ? /^-?[0-9]{0,10}/ : /^-?[0-9.,]{0,10}/ } // definition.type property from parent loader used to disallow fractional number entry Binding { diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 1cc9dac6f9..ac9642cc06 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -328,7 +328,7 @@ Item } else { supportEnabled.setPropertyValue("value", true); // Send the extruder nr as a string. - supportExtruderNr.setPropertyValue("value", parseInt(index - 1) + ""); + supportExtruderNr.setPropertyValue("value", String(index - 1)); } } MouseArea {