mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Added deprecation warning to getExtruderName
This commit is contained in:
parent
57199d8991
commit
1c93dffc22
1 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,7 @@ from UM.Scene.SceneNode import SceneNode
|
||||||
from UM.Scene.Selection import Selection
|
from UM.Scene.Selection import Selection
|
||||||
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
|
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
|
||||||
from UM.Settings.ContainerRegistry import ContainerRegistry # Finding containers by ID.
|
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
|
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.
|
# \param index The index of the extruder whose name to get.
|
||||||
@pyqtSlot(int, result = str)
|
@pyqtSlot(int, result = str)
|
||||||
|
@deprecated("Use Cura.MachineManager.activeMachine.extruders[index].name instead", "4.3")
|
||||||
def getExtruderName(self, index: int) -> str:
|
def getExtruderName(self, index: int) -> str:
|
||||||
try:
|
try:
|
||||||
return self.getActiveExtruderStacks()[index].getName()
|
return self.getActiveExtruderStacks()[index].getName()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue