mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 21:59:37 +08:00
Sort changelog correctly (newest on top). [CURA-6057]
This commit is contained in:
parent
28dc187731
commit
7ceaade26d
@ -39,6 +39,8 @@ 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
|
||||
open_version = Version([0, open_version.getMinor(), open_version.getRevision(), open_version.getPostfixVersion()])
|
||||
open_header = ""
|
||||
change_logs_dict[open_version] = collections.OrderedDict()
|
||||
elif line.startswith("*"):
|
||||
@ -51,8 +53,11 @@ class TextManager(QObject):
|
||||
|
||||
# Format changelog text
|
||||
content = ""
|
||||
for version in change_logs_dict:
|
||||
content += "<h1>" + str(version) + "</h1><br>"
|
||||
for version in sorted(change_logs_dict.keys(), reverse=True):
|
||||
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>"
|
||||
content += ""
|
||||
for change in change_logs_dict[version]:
|
||||
if str(change) != "":
|
||||
|
@ -57,6 +57,11 @@ Item
|
||||
font: UM.Theme.getFont("default")
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
Scrollbar.vertical.position = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user