From 2a28321588a9e7f570021c4a3bd33eede0208caf Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 10 Jan 2020 18:03:20 +0100 Subject: [PATCH] Fix some more typing For some reaso the server is giving me different reuslts... --- cura/LayerPolygon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 6bdd0d53d1..70d818f1ca 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -2,8 +2,9 @@ # Cura is released under the terms of the LGPLv3 or higher. 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.Logger import Logger @@ -232,7 +233,7 @@ class LayerPolygon: @classmethod def getColorMap(cls) -> numpy.ndarray: if cls.__color_map is None: - theme = QtApplication.getInstance().getTheme() + theme = cast(Theme, QtApplication.getInstance().getTheme()) cls.__color_map = numpy.array([ theme.getColor("layerview_none").getRgbF(), # NoneType theme.getColor("layerview_inset_0").getRgbF(), # Inset0Type