mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
CURA-4400 fix disallowed areas by fixing the limit_to_extruder -1 value
This commit is contained in:
parent
d676b85289
commit
906ebe12e1
2 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ from typing import Any, TYPE_CHECKING, Optional
|
|||
|
||||
from PyQt5.QtCore import pyqtProperty, pyqtSignal
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Decorators import override
|
||||
from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
|
||||
from UM.Settings.ContainerStack import ContainerStack
|
||||
|
@ -111,6 +112,8 @@ class ExtruderStack(CuraContainerStack):
|
|||
|
||||
limit_to_extruder = super().getProperty(key, "limit_to_extruder", context)
|
||||
if limit_to_extruder is not None:
|
||||
if limit_to_extruder == -1:
|
||||
limit_to_extruder = int(Application.getInstance().getMachineManager().defaultExtruderPosition)
|
||||
limit_to_extruder = str(limit_to_extruder)
|
||||
if (limit_to_extruder is not None and limit_to_extruder != "-1") and self.getMetaDataEntry("position") != str(limit_to_extruder):
|
||||
if str(limit_to_extruder) in self.getNextStack().extruders:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue