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
diff options
context:
space:
mode:
Diffstat (limited to 'cura/UI/TextManager.py')
-rw-r--r--cura/UI/TextManager.py8
1 files changed, 6 insertions, 2 deletions
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) != "":