mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Move setting visibility resource type from Uranium to Cura
This commit is contained in:
parent
f79e787f2c
commit
4c1002bf47
5 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,9 @@ from UM.Qt.ListModel import ListModel
|
|||
from UM.Resources import Resources
|
||||
from UM.MimeTypeDatabase import MimeTypeDatabase, MimeTypeNotFoundError
|
||||
|
||||
import cura.CuraApplication
|
||||
|
||||
|
||||
class SettingVisibilityPresetsModel(ListModel):
|
||||
IdRole = Qt.UserRole + 1
|
||||
NameRole = Qt.UserRole + 2
|
||||
|
@ -31,7 +34,7 @@ class SettingVisibilityPresetsModel(ListModel):
|
|||
|
||||
def _populate(self):
|
||||
items = []
|
||||
for item in Resources.getAllResourcesOfType(Resources.PresetSettingVisibilityPresets):
|
||||
for item in Resources.getAllResourcesOfType(cura.CuraApplication.CuraApplication.ResourceTypes.SettingVisibilityPreset):
|
||||
try:
|
||||
mime_type = MimeTypeDatabase.getMimeTypeForFile(item)
|
||||
except MimeTypeNotFoundError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue