mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 13:39:00 +08:00
Convex hull is also redrawn when machineInstance is changed
CURA-742
This commit is contained in:
parent
d68e17c9f5
commit
782c4508c6
@ -17,6 +17,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
|
|
||||||
self._profile = None
|
self._profile = None
|
||||||
Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged)
|
Application.getInstance().getMachineManager().activeProfileChanged.connect(self._onActiveProfileChanged)
|
||||||
|
Application.getInstance().getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineInstanceChanged)
|
||||||
self._onActiveProfileChanged()
|
self._onActiveProfileChanged()
|
||||||
|
|
||||||
## Force that a new (empty) object is created upon copy.
|
## Force that a new (empty) object is created upon copy.
|
||||||
@ -67,6 +68,14 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
if self._profile:
|
if self._profile:
|
||||||
self._profile.settingValueChanged.connect(self._onSettingValueChanged)
|
self._profile.settingValueChanged.connect(self._onSettingValueChanged)
|
||||||
|
|
||||||
|
def _onActiveMachineInstanceChanged(self):
|
||||||
|
if self._convex_hull_job:
|
||||||
|
self._convex_hull_job.cancel()
|
||||||
|
self.setConvexHull(None)
|
||||||
|
if self._convex_hull_node:
|
||||||
|
self._convex_hull_node.setParent(None)
|
||||||
|
self._convex_hull_node = None
|
||||||
|
|
||||||
def _onSettingValueChanged(self, setting):
|
def _onSettingValueChanged(self, setting):
|
||||||
if setting == "print_sequence":
|
if setting == "print_sequence":
|
||||||
if self._convex_hull_job:
|
if self._convex_hull_job:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user