mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:49:04 +08:00
Merge branch 'main' into CURA-11483
This commit is contained in:
commit
15156c70ad
@ -104,7 +104,8 @@ from cura.Settings.SettingInheritanceManager import SettingInheritanceManager
|
||||
from cura.Settings.SidebarCustomMenuItemsModel import SidebarCustomMenuItemsModel
|
||||
from cura.Settings.SimpleModeSettingsManager import SimpleModeSettingsManager
|
||||
from cura.TaskManagement.OnExitCallbackManager import OnExitCallbackManager
|
||||
from cura.UI import CuraSplashScreen, MachineActionManager, PrintInformation
|
||||
from cura.UI import CuraSplashScreen, PrintInformation
|
||||
from cura.UI.MachineActionManager import MachineActionManager
|
||||
from cura.UI.AddPrinterPagesModel import AddPrinterPagesModel
|
||||
from cura.UI.MachineSettingsManager import MachineSettingsManager
|
||||
from cura.UI.ObjectsModel import ObjectsModel
|
||||
@ -186,7 +187,7 @@ class CuraApplication(QtApplication):
|
||||
|
||||
self._cura_formula_functions = None # type: Optional[CuraFormulaFunctions]
|
||||
|
||||
self._machine_action_manager = None # type: Optional[MachineActionManager.MachineActionManager]
|
||||
self._machine_action_manager: Optional[MachineActionManager] = None
|
||||
|
||||
self.empty_container = None # type: EmptyInstanceContainer
|
||||
self.empty_definition_changes_container = None # type: EmptyInstanceContainer
|
||||
@ -352,7 +353,7 @@ class CuraApplication(QtApplication):
|
||||
self.__addAllEmptyContainers()
|
||||
self.__setLatestResouceVersionsForVersionUpgrade()
|
||||
|
||||
self._machine_action_manager = MachineActionManager.MachineActionManager(self)
|
||||
self._machine_action_manager = MachineActionManager(self)
|
||||
self._machine_action_manager.initialize()
|
||||
|
||||
def __sendCommandToSingleInstance(self):
|
||||
@ -1135,18 +1136,16 @@ class CuraApplication(QtApplication):
|
||||
self._setting_inheritance_manager = SettingInheritanceManager.createSettingInheritanceManager()
|
||||
return self._setting_inheritance_manager
|
||||
|
||||
def getMachineActionManager(self, *args: Any) -> MachineActionManager.MachineActionManager:
|
||||
@pyqtSlot(result = QObject)
|
||||
def getMachineActionManager(self, *args: Any) -> MachineActionManager:
|
||||
"""Get the machine action manager
|
||||
|
||||
We ignore any *args given to this, as we also register the machine manager as qml singleton.
|
||||
It wants to give this function an engine and script engine, but we don't care about that.
|
||||
"""
|
||||
|
||||
return cast(MachineActionManager.MachineActionManager, self._machine_action_manager)
|
||||
return self._machine_action_manager
|
||||
|
||||
@pyqtSlot(result = QObject)
|
||||
def getMachineActionManagerQml(self)-> MachineActionManager.MachineActionManager:
|
||||
return cast(QObject, self._machine_action_manager)
|
||||
|
||||
@pyqtSlot(result = QObject)
|
||||
def getMaterialManagementModel(self) -> MaterialManagementModel:
|
||||
@ -1270,7 +1269,7 @@ class CuraApplication(QtApplication):
|
||||
qmlRegisterSingletonType(IntentManager, "Cura", 1, 6, self.getIntentManager, "IntentManager")
|
||||
qmlRegisterSingletonType(SettingInheritanceManager, "Cura", 1, 0, self.getSettingInheritanceManager, "SettingInheritanceManager")
|
||||
qmlRegisterSingletonType(SimpleModeSettingsManager, "Cura", 1, 0, self.getSimpleModeSettingsManagerWrapper, "SimpleModeSettingsManager")
|
||||
qmlRegisterSingletonType(MachineActionManager.MachineActionManager, "Cura", 1, 0, self.getMachineActionManagerWrapper, "MachineActionManager")
|
||||
qmlRegisterSingletonType(MachineActionManager, "Cura", 1, 0, self.getMachineActionManagerWrapper, "MachineActionManager")
|
||||
|
||||
self.processEvents()
|
||||
qmlRegisterType(NetworkingUtil, "Cura", 1, 5, "NetworkingUtil")
|
||||
|
@ -1668,7 +1668,7 @@
|
||||
"value": "skin_line_width * 2",
|
||||
"default_value": 1,
|
||||
"minimum_value": "0",
|
||||
"maximum_value_warning": "skin_line_width * 3",
|
||||
"maximum_value_warning": "skin_line_width * 10",
|
||||
"type": "float",
|
||||
"enabled": "(top_layers > 0 or bottom_layers > 0) and top_bottom_pattern != 'concentric'",
|
||||
"limit_to_extruder": "top_bottom_extruder_nr",
|
||||
|
@ -11,6 +11,7 @@
|
||||
"exclude_materials": [],
|
||||
"first_start_actions": [ "MachineSettingsAction" ],
|
||||
"has_materials": true,
|
||||
"machine_extruder_trains": { "0": "ratrig_base_extruder_0" },
|
||||
"preferred_material": "generic_pla",
|
||||
"preferred_quality_type": "standard",
|
||||
"quality_definition": "ratrig_base",
|
||||
|
@ -27,7 +27,6 @@
|
||||
"cool_fan_full_at_height": { "value": "layer_height_0 + 2 * layer_height" },
|
||||
"cool_min_layer_time": { "value": 2 },
|
||||
"fill_outline_gaps": { "value": false },
|
||||
"filter_out_tiny_gaps": { "value": false },
|
||||
"gantry_height": { "value": 30 },
|
||||
"infill_before_walls": { "value": false },
|
||||
"infill_overlap": { "value": 30 },
|
||||
|
@ -34,7 +34,6 @@
|
||||
"cool_fan_full_at_height": { "value": "layer_height_0 + 2 * layer_height" },
|
||||
"cool_min_layer_time": { "value": 2 },
|
||||
"fill_outline_gaps": { "value": false },
|
||||
"filter_out_tiny_gaps": { "value": false },
|
||||
"gantry_height": { "value": 30 },
|
||||
"infill_before_walls": { "value": false },
|
||||
"infill_overlap": { "value": 30 },
|
||||
|
@ -386,6 +386,7 @@
|
||||
"skin_preshrink": { "value": 0 },
|
||||
"skirt_brim_material_flow": { "value": "material_flow" },
|
||||
"skirt_brim_minimal_length": { "value": 500 },
|
||||
"small_skin_width": { "value": 4 },
|
||||
"speed_equalize_flow_width_factor": { "value": 0 },
|
||||
"speed_prime_tower": { "value": "speed_topbottom" },
|
||||
"speed_print": { "value": 50 },
|
||||
@ -426,7 +427,7 @@
|
||||
"travel_avoid_other_parts": { "value": false },
|
||||
"wall_0_inset": { "value": 0 },
|
||||
"wall_0_material_flow": { "value": "material_flow" },
|
||||
"wall_0_wipe_dist": { "value": 0 },
|
||||
"wall_0_wipe_dist": { "value": 0.8 },
|
||||
"wall_material_flow": { "value": "material_flow" },
|
||||
"wall_x_material_flow": { "value": "material_flow" },
|
||||
"xy_offset": { "value": 0 },
|
||||
|
@ -12,7 +12,7 @@ import Cura 1.0 as Cura
|
||||
UM.ManagementPage
|
||||
{
|
||||
id: base
|
||||
property var machineActionManager: CuraApplication.getMachineActionManagerQml()
|
||||
property var machineActionManager: CuraApplication.getMachineActionManager()
|
||||
Item { enabled: false; UM.I18nCatalog { id: catalog; name: "cura"} }
|
||||
|
||||
title: catalog.i18nc("@title:tab", "Printers")
|
||||
@ -63,7 +63,7 @@ UM.ManagementPage
|
||||
Repeater
|
||||
{
|
||||
id: machineActionRepeater
|
||||
model: base.currentItem ? machineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null
|
||||
model: base.currentItem.id ? machineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null
|
||||
|
||||
Item
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user