mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
CURA-4525 automatic build plate menu items using BuildPlateModel
This commit is contained in:
parent
97f61366a8
commit
bd8aa8d989
12 changed files with 131 additions and 152 deletions
|
@ -70,7 +70,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||
# Workaround to disable layer view processing if layer view is not active.
|
||||
self._layer_view_active = False
|
||||
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
|
||||
Application.getInstance().activeBuildPlateChanged.connect(self._onActiveViewChanged)
|
||||
Application.getInstance().getBuildPlateModel().activeBuildPlateChanged.connect(self._onActiveViewChanged)
|
||||
self._onActiveViewChanged()
|
||||
self._stored_layer_data = []
|
||||
self._stored_optimized_layer_data = {} # key is build plate number, then arrays are stored until they go to the ProcessSlicesLayersJob
|
||||
|
@ -564,7 +564,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||
Logger.log("d", "Slicing took %s seconds", time() - self._slice_start_time )
|
||||
|
||||
# See if we need to process the sliced layers job.
|
||||
active_build_plate = Application.getInstance().activeBuildPlate
|
||||
active_build_plate = Application.getInstance().getBuildPlateModel().activeBuildPlate
|
||||
if self._layer_view_active and (self._process_layers_job is None or not self._process_layers_job.isRunning()) and active_build_plate == self._start_slice_job_build_plate:
|
||||
self._startProcessSlicedLayersJob(active_build_plate)
|
||||
# self._onActiveViewChanged()
|
||||
|
@ -682,7 +682,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||
application = Application.getInstance()
|
||||
view = application.getController().getActiveView()
|
||||
if view:
|
||||
active_build_plate = application.activeBuildPlate
|
||||
active_build_plate = application.getBuildPlateModel().activeBuildPlate
|
||||
if view.getPluginId() == "LayerView": # If switching to layer view, we should process the layers if that hasn't been done yet.
|
||||
self._layer_view_active = True
|
||||
# There is data and we're not slicing at the moment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue