mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 01:59:17 +08:00
Merge branch '4.0' into STAR-322_cloud-connection
This commit is contained in:
commit
64f5c4f263
@ -36,12 +36,12 @@ class CuraActions(QObject):
|
|||||||
# Starting a web browser from a signal handler connected to a menu will crash on windows.
|
# Starting a web browser from a signal handler connected to a menu will crash on windows.
|
||||||
# So instead, defer the call to the next run of the event loop, since that does work.
|
# So instead, defer the call to the next run of the event loop, since that does work.
|
||||||
# Note that weirdly enough, only signal handlers that open a web browser fail like that.
|
# Note that weirdly enough, only signal handlers that open a web browser fail like that.
|
||||||
event = CallFunctionEvent(self._openUrl, [QUrl("http://ultimaker.com/en/support/software")], {})
|
event = CallFunctionEvent(self._openUrl, [QUrl("https://ultimaker.com/en/resources/manuals/software")], {})
|
||||||
cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
|
cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def openBugReportPage(self) -> None:
|
def openBugReportPage(self) -> None:
|
||||||
event = CallFunctionEvent(self._openUrl, [QUrl("http://github.com/Ultimaker/Cura/issues")], {})
|
event = CallFunctionEvent(self._openUrl, [QUrl("https://github.com/Ultimaker/Cura/issues")], {})
|
||||||
cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
|
cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
|
||||||
|
|
||||||
## Reset camera position and direction to default
|
## Reset camera position and direction to default
|
||||||
|
@ -86,8 +86,8 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
self._layer_view_active = False #type: bool
|
self._layer_view_active = False #type: bool
|
||||||
self._onActiveViewChanged()
|
self._onActiveViewChanged()
|
||||||
|
|
||||||
self._stored_layer_data = [] #type: List[Arcus.PythonMessage]
|
self._stored_layer_data = [] # type: List[Arcus.PythonMessage]
|
||||||
self._stored_optimized_layer_data = {} #type: Dict[int, List[Arcus.PythonMessage]] # key is build plate number, then arrays are stored until they go to the ProcessSlicesLayersJob
|
self._stored_optimized_layer_data = {} # type: Dict[int, List[Arcus.PythonMessage]] # key is build plate number, then arrays are stored until they go to the ProcessSlicesLayersJob
|
||||||
|
|
||||||
self._scene = self._application.getController().getScene() #type: Scene
|
self._scene = self._application.getController().getScene() #type: Scene
|
||||||
self._scene.sceneChanged.connect(self._onSceneChanged)
|
self._scene.sceneChanged.connect(self._onSceneChanged)
|
||||||
@ -246,7 +246,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
num_objects = self._numObjectsPerBuildPlate()
|
num_objects = self._numObjectsPerBuildPlate()
|
||||||
|
|
||||||
self._stored_layer_data = []
|
self._stored_layer_data = []
|
||||||
self._stored_optimized_layer_data[build_plate_to_be_sliced] = []
|
|
||||||
|
|
||||||
if build_plate_to_be_sliced not in num_objects or num_objects[build_plate_to_be_sliced] == 0:
|
if build_plate_to_be_sliced not in num_objects or num_objects[build_plate_to_be_sliced] == 0:
|
||||||
self._scene.gcode_dict[build_plate_to_be_sliced] = [] #type: ignore #Because we created this attribute above.
|
self._scene.gcode_dict[build_plate_to_be_sliced] = [] #type: ignore #Because we created this attribute above.
|
||||||
@ -254,7 +254,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
if self._build_plates_to_be_sliced:
|
if self._build_plates_to_be_sliced:
|
||||||
self.slice()
|
self.slice()
|
||||||
return
|
return
|
||||||
|
self._stored_optimized_layer_data[build_plate_to_be_sliced] = []
|
||||||
if self._application.getPrintInformation() and build_plate_to_be_sliced == active_build_plate:
|
if self._application.getPrintInformation() and build_plate_to_be_sliced == active_build_plate:
|
||||||
self._application.getPrintInformation().setToZeroPrintInformation(build_plate_to_be_sliced)
|
self._application.getPrintInformation().setToZeroPrintInformation(build_plate_to_be_sliced)
|
||||||
|
|
||||||
|
@ -7,16 +7,18 @@ import QtQuick.Controls 1.4
|
|||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Instantiator {
|
Instantiator
|
||||||
model: UM.ContainerStacksModel {
|
{
|
||||||
filter: {"type": "machine", "um_network_key": null}
|
model: Cura.PrintersModel {}
|
||||||
}
|
|
||||||
MenuItem {
|
MenuItem
|
||||||
text: model.name;
|
{
|
||||||
checkable: true;
|
text: model.name
|
||||||
|
checkable: true
|
||||||
checked: Cura.MachineManager.activeMachineId == model.id
|
checked: Cura.MachineManager.activeMachineId == model.id
|
||||||
exclusiveGroup: group;
|
exclusiveGroup: group
|
||||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id);
|
visible: !model.hasRemoteConnection
|
||||||
|
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||||
}
|
}
|
||||||
onObjectAdded: menu.insertItem(index, object)
|
onObjectAdded: menu.insertItem(index, object)
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: menu.removeItem(object)
|
||||||
|
@ -9,19 +9,15 @@ import Cura 1.0 as Cura
|
|||||||
|
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: UM.ContainerStacksModel
|
model: Cura.PrintersModel {}
|
||||||
{
|
|
||||||
filter: {"type": "machine", "um_network_key": "*", "hidden": "False"}
|
|
||||||
}
|
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
// TODO: Use printer_group icon when it's a cluster. Not use it for now since it doesn't look as expected
|
|
||||||
// iconSource: UM.Theme.getIcon("printer_single")
|
|
||||||
text: model.metadata["connect_group_name"]
|
text: model.metadata["connect_group_name"]
|
||||||
checkable: true;
|
checkable: true
|
||||||
|
visible: model.hasRemoteConnection
|
||||||
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
||||||
exclusiveGroup: group;
|
exclusiveGroup: group
|
||||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id);
|
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||||
}
|
}
|
||||||
onObjectAdded: menu.insertItem(index, object)
|
onObjectAdded: menu.insertItem(index, object)
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: menu.removeItem(object)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user