Commit 0dc00cf0 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets][editor] Store the schema version within the editor

parent df163952
......@@ -51,6 +51,7 @@ class AbstractAssetEditor(QWidget):
super(AbstractAssetEditor, self).__init__(parent)
self.asset_type = asset_type
self.schema_version = None
self.clear_dirty()
self.title_label = QLabel(self.tr("Unknown"))
......@@ -143,6 +144,8 @@ class AbstractAssetEditor(QWidget):
def load_json(self, json_object):
"""Load the json object passed as parameter"""
self.schema_version = json_object.get("schema_version")
self.blockSignals(True)
self.description_lineedit.setText(json_object.get("description"))
self._load_json(json_object)
......@@ -154,6 +157,9 @@ class AbstractAssetEditor(QWidget):
json_data = {}
if self.schema_version:
json_data["schema_version"] = self.schema_version
description = self.description_lineedit.text()
if description:
json_data["description"] = description
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment