mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 05:37:50 -06:00
Prevent max recursion for convex hull calculation
fixes CURA-3W
This commit is contained in:
parent
f4d1d5d936
commit
27c6cb4c1e
1 changed files with 8 additions and 1 deletions
|
@ -36,8 +36,10 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||
|
||||
# Make sure the timer is created on the main thread
|
||||
self._recompute_convex_hull_timer = None # type: Optional[QTimer]
|
||||
self._timer_scheduled_to_be_created = False
|
||||
from cura.CuraApplication import CuraApplication
|
||||
if CuraApplication.getInstance() is not None:
|
||||
self._timer_scheduled_to_be_created = True
|
||||
CuraApplication.getInstance().callLater(self.createRecomputeConvexHullTimer)
|
||||
|
||||
self._raft_thickness = 0.0
|
||||
|
@ -171,7 +173,12 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||
if self._recompute_convex_hull_timer is not None:
|
||||
self._recompute_convex_hull_timer.start()
|
||||
else:
|
||||
self.recomputeConvexHull()
|
||||
from cura.CuraApplication import CuraApplication
|
||||
if not self._timer_scheduled_to_be_created:
|
||||
# The timer is not created and we never scheduled it. Time to create it now!
|
||||
CuraApplication.getInstance().callLater(self.createRecomputeConvexHullTimer)
|
||||
# Now we know for sure that the timer has been scheduled for creation, so we can try this again.
|
||||
CuraApplication.getInstance().callLater(self.recomputeConvexHullDelayed)
|
||||
|
||||
def recomputeConvexHull(self) -> None:
|
||||
controller = Application.getInstance().getController()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue