mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix editor priority fields not updating correctly.
If an editor is opened, then a masterlist update performed, LOOT wasn't updating the editor priority fields to account for any priority change. Fixes #362.
This commit is contained in:
@@ -250,6 +250,11 @@ loot-editor-close
|
||||
</template>
|
||||
<script>
|
||||
Polymer({
|
||||
observe: {
|
||||
'data.isGlobalPriority': 'onPriorityChange',
|
||||
'data.modPriority': 'onPriorityChange',
|
||||
},
|
||||
|
||||
attached: function() {
|
||||
this.shadowRoot.getElementById('tableTabs').addEventListener('core-select', this.onTabSelect, false);
|
||||
|
||||
@@ -284,6 +289,14 @@ loot-editor-close
|
||||
}
|
||||
},
|
||||
|
||||
onPriorityChange: function(oldValue, newValue) {
|
||||
/* Handle priority change due to masterlist update. */
|
||||
if (this.data) {
|
||||
/* Set the new editor data. */
|
||||
this.setEditorData(this.data);
|
||||
}
|
||||
},
|
||||
|
||||
readFromEditor: function(oldData) {
|
||||
/* Need to turn all the editor controls' values into data to
|
||||
process. The control values can be compared with the existing
|
||||
|
||||
Reference in New Issue
Block a user