mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-18 02:36:02 +08:00
Fix some more typing
For some reaso the server is giving me different reuslts...
This commit is contained in:
parent
eaf8b3491e
commit
2a28321588
@ -2,8 +2,9 @@
|
|||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional, cast
|
||||||
|
|
||||||
|
from UM.Qt.Bindings.Theme import Theme
|
||||||
from UM.Qt.QtApplication import QtApplication
|
from UM.Qt.QtApplication import QtApplication
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
|
||||||
@ -232,7 +233,7 @@ class LayerPolygon:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def getColorMap(cls) -> numpy.ndarray:
|
def getColorMap(cls) -> numpy.ndarray:
|
||||||
if cls.__color_map is None:
|
if cls.__color_map is None:
|
||||||
theme = QtApplication.getInstance().getTheme()
|
theme = cast(Theme, QtApplication.getInstance().getTheme())
|
||||||
cls.__color_map = numpy.array([
|
cls.__color_map = numpy.array([
|
||||||
theme.getColor("layerview_none").getRgbF(), # NoneType
|
theme.getColor("layerview_none").getRgbF(), # NoneType
|
||||||
theme.getColor("layerview_inset_0").getRgbF(), # Inset0Type
|
theme.getColor("layerview_inset_0").getRgbF(), # Inset0Type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user