Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura/UI
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2020-12-20 23:55:13 +0300
committerRemco Burema <r.burema@ultimaker.com>2020-12-20 23:55:13 +0300
commit0fdcd208eeec9ab36a4e90e49c5ac5b589579afe (patch)
tree26658dc26a9ba5952c67986dcbe1f95ff2d67c21 /cura/UI
parentbb0d2cad40fc17feb10223aab9838f7a2de8a8ba (diff)
Possible alternate non-numbered versions.
CURA-7932
Diffstat (limited to 'cura/UI')
-rw-r--r--cura/UI/CuraSplashScreen.py6
-rw-r--r--cura/UI/TextManager.py8
2 files changed, 10 insertions, 4 deletions
diff --git a/cura/UI/CuraSplashScreen.py b/cura/UI/CuraSplashScreen.py
index d9caa207f4..4fa798247d 100644
--- a/cura/UI/CuraSplashScreen.py
+++ b/cura/UI/CuraSplashScreen.py
@@ -17,7 +17,9 @@ class CuraSplashScreen(QSplashScreen):
self._scale = 0.7
self._version_y_offset = 0 # when extra visual elements are in the background image, move version text down
- if ApplicationMetadata.IsEnterpriseVersion:
+ if ApplicationMetadata.IsAlternateVersion:
+ splash_image = QPixmap(Resources.getPath(Resources.Images, "cura_wip.png"))
+ elif ApplicationMetadata.IsEnterpriseVersion:
splash_image = QPixmap(Resources.getPath(Resources.Images, "cura_enterprise.png"))
self._version_y_offset = 26
else:
@@ -70,7 +72,7 @@ class CuraSplashScreen(QSplashScreen):
font = QFont() # Using system-default font here
font.setPixelSize(18)
painter.setFont(font)
- painter.drawText(60, 70 + self._version_y_offset, round(330 * self._scale), round(230 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[0])
+ painter.drawText(60, 70 + self._version_y_offset, round(330 * self._scale), round(230 * self._scale), Qt.AlignLeft | Qt.AlignTop, version[0] if not ApplicationMetadata.IsAlternateVersion else ApplicationMetadata.CuraBuildType)
if len(version) > 1:
font.setPixelSize(16)
painter.setFont(font)
diff --git a/cura/UI/TextManager.py b/cura/UI/TextManager.py
index dbe7940f26..99c1a55d46 100644
--- a/cura/UI/TextManager.py
+++ b/cura/UI/TextManager.py
@@ -43,7 +43,9 @@ class TextManager(QObject):
line = line.replace("[", "")
line = line.replace("]", "")
open_version = Version(line)
- if open_version > Version([14, 99, 99]): # Bit of a hack: We released the 15.x.x versions before 2.x
+ if open_version < Version([0, 0, 1]): # Something went wrong with parsing, assume non-numerical alternate version that should be on top.
+ open_version = Version([99, 99, 99])
+ if Version([14, 99, 99]) < open_version < Version([16, 0, 0]): # Bit of a hack: We released the 15.x.x versions before 2.x
open_version = Version([0, open_version.getMinor(), open_version.getRevision(), open_version.getPostfixVersion()])
open_header = ""
change_logs_dict[open_version] = collections.OrderedDict()
@@ -61,7 +63,9 @@ class TextManager(QObject):
text_version = version
if version < Version([1, 0, 0]): # Bit of a hack: We released the 15.x.x versions before 2.x
text_version = Version([15, version.getMinor(), version.getRevision(), version.getPostfixVersion()])
- content += "<h1>" + str(text_version) + "</h1><br>"
+ if version > Version([99, 0, 0]): # Leave it out altogether if it was originally a non-numbered version.
+ text_version = ""
+ content += ("<h1>" + str(text_version) + "</h1><br>") if text_version else ""
content += ""
for change in change_logs_dict[version]:
if str(change) != "":