mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 05:07:50 -06:00
Added sections to the packagelists
By providing a `section_title` with a string to the `package_data` packages can be subdivided in sections, each with its own header. For remote packages this will be `None` and therefore no sections are created there. Contributes to CURA-8558
This commit is contained in:
parent
397baebda4
commit
c4c99f6657
3 changed files with 33 additions and 2 deletions
|
@ -41,8 +41,11 @@ class LocalPackageList(PackageList):
|
|||
|
||||
bundled = plugin_registry.getInstalledPlugins()
|
||||
for b in bundled:
|
||||
package = PackageModel({"package_id": b, "display_name": b}, parent = self)
|
||||
package = PackageModel({"package_id": b, "display_name": b, "section_title": "bundled"}, parent = self)
|
||||
self.appendItem({"package": package})
|
||||
packages = package_manager.getInstalledPackageIDs()
|
||||
for p in packages:
|
||||
package = PackageModel({"package_id": p, "display_name": p, "section_title": "package"}, parent = self)
|
||||
self.appendItem({"package": package})
|
||||
self.setIsLoading(False)
|
||||
self.setHasMore(False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue