mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Apply "Rename new cube" setting to all elements
This commit is contained in:
parent
74e52d5a16
commit
9b078273dc
@ -857,7 +857,6 @@ BARS.defineActions(function() {
|
|||||||
Blockbench.dispatchEvent( 'add_cube', {object: base_cube} )
|
Blockbench.dispatchEvent( 'add_cube', {object: base_cube} )
|
||||||
|
|
||||||
Vue.nextTick(function() {
|
Vue.nextTick(function() {
|
||||||
updateSelection()
|
|
||||||
if (settings.create_rename.value) {
|
if (settings.create_rename.value) {
|
||||||
base_cube.rename()
|
base_cube.rename()
|
||||||
}
|
}
|
||||||
|
@ -500,7 +500,19 @@ function getAllGroups() {
|
|||||||
iterate(Outliner.root)
|
iterate(Outliner.root)
|
||||||
return ta;
|
return ta;
|
||||||
}
|
}
|
||||||
function addGroup() {
|
window.__defineGetter__('selected_group', () => {
|
||||||
|
console.warn('selected_group is deprecated. Please use Group.selected instead.')
|
||||||
|
return Group.selected
|
||||||
|
})
|
||||||
|
|
||||||
|
BARS.defineActions(function() {
|
||||||
|
new Action({
|
||||||
|
id: 'add_group',
|
||||||
|
icon: 'create_new_folder',
|
||||||
|
category: 'edit',
|
||||||
|
condition: () => Modes.edit,
|
||||||
|
keybind: new Keybind({key: 71, ctrl: true}),
|
||||||
|
click: function () {
|
||||||
Undo.initEdit({outliner: true});
|
Undo.initEdit({outliner: true});
|
||||||
var add_group = Group.selected
|
var add_group = Group.selected
|
||||||
if (!add_group && selected.length) {
|
if (!add_group && selected.length) {
|
||||||
@ -532,21 +544,6 @@ function addGroup() {
|
|||||||
Blockbench.dispatchEvent( 'add_group', {object: base_group} )
|
Blockbench.dispatchEvent( 'add_group', {object: base_group} )
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
window.__defineGetter__('selected_group', () => {
|
|
||||||
console.warn('selected_group is deprecated. Please use Group.selected instead.')
|
|
||||||
return Group.selected
|
|
||||||
})
|
|
||||||
|
|
||||||
BARS.defineActions(function() {
|
|
||||||
new Action({
|
|
||||||
id: 'add_group',
|
|
||||||
icon: 'create_new_folder',
|
|
||||||
category: 'edit',
|
|
||||||
condition: () => Modes.edit,
|
|
||||||
keybind: new Keybind({key: 71, ctrl: true}),
|
|
||||||
click: function () {
|
|
||||||
addGroup();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
new Action({
|
new Action({
|
||||||
id: 'collapse_groups',
|
id: 'collapse_groups',
|
||||||
|
@ -107,6 +107,11 @@ BARS.defineActions(function() {
|
|||||||
locator.select().createUniqueName();
|
locator.select().createUniqueName();
|
||||||
objs.push(locator);
|
objs.push(locator);
|
||||||
Undo.finishEdit('add locator');
|
Undo.finishEdit('add locator');
|
||||||
|
Vue.nextTick(function() {
|
||||||
|
if (settings.create_rename.value) {
|
||||||
|
locator.rename();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user