Remember advanced outliner toggles state

This commit is contained in:
JannisX11 2021-08-11 23:06:21 +02:00
parent 57ea0f204d
commit 75fe2f58f8

View File

@ -778,14 +778,18 @@ function toggleCubeProperty(key) {
Undo.finishEdit('Toggle ' + key) Undo.finishEdit('Toggle ' + key)
} }
StateMemory.init('advanced_outliner_toggles', 'boolean')
BARS.defineActions(function() { BARS.defineActions(function() {
new Toggle('outliner_toggle', { new Toggle('outliner_toggle', {
icon: 'dns', icon: 'dns',
category: 'edit', category: 'edit',
keybind: new Keybind({key: 115}), keybind: new Keybind({key: 115}),
default: StateMemory.advanced_outliner_toggles,
onChange: function (value) { onChange: function (value) {
Outliner.vue._data.options.show_advanced_toggles = value; Outliner.vue.options.show_advanced_toggles = value;
StateMemory.advanced_outliner_toggles = value;
StateMemory.save('advanced_outliner_toggles');
} }
}) })
new BarText('cube_counter', { new BarText('cube_counter', {
@ -1116,7 +1120,7 @@ Interface.definePanels(function() {
root: Outliner.root, root: Outliner.root,
options: { options: {
width: 300, width: 300,
show_advanced_toggles: false, show_advanced_toggles: StateMemory.advanced_outliner_toggles,
hidden_types: [] hidden_types: []
} }
}}, }},