mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
CURA-4526 Add to SimulationView the same behavior than LayerView
This commit is contained in:
parent
74a7f02166
commit
97fd926654
2 changed files with 4 additions and 4 deletions
|
@ -588,7 +588,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||
def _onActiveViewChanged(self):
|
||||
if Application.getInstance().getController().getActiveView():
|
||||
view = Application.getInstance().getController().getActiveView()
|
||||
if view.getPluginId() == "LayerView": # If switching to layer view, we should process the layers if that hasn't been done yet.
|
||||
if view.getPluginId() in ("LayerView", "SimulationView"): # 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
|
||||
# if we are slicing, there is no need to re-calculate the data as it will be invalid in a moment.
|
||||
|
|
|
@ -61,7 +61,7 @@ class ProcessSlicedLayersJob(Job):
|
|||
|
||||
def run(self):
|
||||
start_time = time()
|
||||
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
|
||||
if Application.getInstance().getController().getActiveView().getPluginId() in ("LayerView", "SimulationView"):
|
||||
self._progress_message.show()
|
||||
Job.yieldThread()
|
||||
if self._abort_requested:
|
||||
|
@ -219,7 +219,7 @@ class ProcessSlicedLayersJob(Job):
|
|||
self._progress_message.setProgress(100)
|
||||
|
||||
view = Application.getInstance().getController().getActiveView()
|
||||
if view.getPluginId() == "LayerView":
|
||||
if view.getPluginId() in ("LayerView", "SimulationView"):
|
||||
view.resetLayerData()
|
||||
|
||||
if self._progress_message:
|
||||
|
@ -232,7 +232,7 @@ class ProcessSlicedLayersJob(Job):
|
|||
|
||||
def _onActiveViewChanged(self):
|
||||
if self.isRunning():
|
||||
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
|
||||
if Application.getInstance().getController().getActiveView().getPluginId() in ("LayerView", "SimulationView"):
|
||||
if not self._progress_message:
|
||||
self._progress_message = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0, catalog.i18nc("@info:title", "Information"))
|
||||
if self._progress_message.getProgress() != 100:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue