mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 03:29:00 +08:00
Added deprecation warning to getExtruderName
This commit is contained in:
parent
57199d8991
commit
1c93dffc22
@ -12,7 +12,7 @@ from UM.Scene.SceneNode import SceneNode
|
||||
from UM.Scene.Selection import Selection
|
||||
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry # Finding containers by ID.
|
||||
from UM.Settings.ContainerStack import ContainerStack
|
||||
from UM.Decorators import deprecated
|
||||
|
||||
from typing import Any, cast, Dict, List, Optional, TYPE_CHECKING, Union
|
||||
|
||||
@ -95,6 +95,7 @@ class ExtruderManager(QObject):
|
||||
#
|
||||
# \param index The index of the extruder whose name to get.
|
||||
@pyqtSlot(int, result = str)
|
||||
@deprecated("Use Cura.MachineManager.activeMachine.extruders[index].name instead", "4.3")
|
||||
def getExtruderName(self, index: int) -> str:
|
||||
try:
|
||||
return self.getActiveExtruderStacks()[index].getName()
|
||||
|
Loading…
x
Reference in New Issue
Block a user