Skip to content

Commit 288cee3

Browse files
committed
Add default asset image to support all mal languages
1 parent c6fd1bc commit 288cee3

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

mal_gui/MainWindow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(self,app,malLanguageMarFilePath):
105105
if not asset.is_abstract:
106106
self.assetFactory.registerAsset(
107107
asset.name,
108-
assetImages[asset.name]
108+
assetImages.get(asset.name, image_path('unknown.png'))
109109
)
110110

111111
#assetFactory registration should complete before injecting into ModelScene

mal_gui/ObjectExplorer/AssetBase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self, assetType, assetName, imagePath, parent=None):
2424
self.assetName = assetName
2525
self.assetSequenceId = AssetBase.generateNextSequenceId()
2626
self.imagePath = imagePath
27-
print("image path = "+ self.imagePath)
27+
print("image path = ", self.imagePath)
2828

2929
# self.image = QPixmap(self.imagePath).scaled(30, 30, Qt.KeepAspectRatio) # Scale the image here
3030
# self.image = QPixmap(self.imagePath)

mal_gui/images/unknown.png

4.74 KB
Loading

0 commit comments

Comments
 (0)