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
|
@ -7,6 +7,7 @@ from typing import Any, Dict, Optional
|
|||
|
||||
from PyQt5.QtCore import pyqtProperty
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Decorators import override
|
||||
|
||||
from UM.MimeTypeDatabase import MimeType, MimeTypeDatabase
|
||||
|
@ -104,6 +105,8 @@ class GlobalStack(CuraContainerStack):
|
|||
# Handle the "limit_to_extruder" property.
|
||||
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 limit_to_extruder in self._extruders:
|
||||
if super().getProperty(key, "settable_per_extruder", context):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue