Fix #2605 Blockbench closes after using enter key with extrude tool

This commit is contained in:
JannisX11 2024-12-27 18:47:03 +01:00
parent 42d0aec873
commit ac2b38ff51
5 changed files with 7 additions and 5 deletions

View File

@ -1228,7 +1228,7 @@
width: fit-content;
z-index: 3;
}
#amend_edit_menu > form {
#amend_edit_menu > div.form {
background-color: var(--color-ui);
padding: 2px 10px;
}

View File

@ -4,7 +4,7 @@ class InputForm extends EventSystem {
this.uuid = guid();
this.form_config = form_config;
this.form_data = {};
this.node = Interface.createElement('form', {class: 'form'});
this.node = Interface.createElement('div', {class: 'form'});
this.max_label_width = 0;
this.uses_wide_inputs = false;

View File

@ -935,6 +935,9 @@ addEventListeners(document, 'keydown mousedown', function(e) {
ReferenceImageMode.deactivate();
used = true;
}
} else if (Undo.amend_edit_menu && (Keybinds.extra.confirm.keybind.isTriggered(e) || Keybinds.extra.cancel.keybind.isTriggered(e))) {
Undo.closeAmendEditMenu();
} else if (Prop.active_panel == 'uv' && Modes.paint && Texture.selected && Texture.selected.selection.is_custom) {
if (Keybinds.extra.cancel.keybind.isTriggered(e)) {
SharedActions.run('unselect_all', e);

View File

@ -2267,7 +2267,6 @@ BARS.defineActions(function() {
}
}
})
console.log(count, direction.slice());
if (count > 1) {
let magnitude = Math.sqrt(direction[0]**2 + direction[1]**2 + direction[2]**2);
direction.V3_divide(magnitude);

View File

@ -1771,7 +1771,7 @@
"action.create_texture_group.desc": "Create a group for your textures",
"action.create_material": "Create Material",
"action.create_material.desc": "Create a new PBR material out of the selected texture",
"action.generate_pbr_map": "Generate PBR Map",
"action.generate_pbr_map": "Generate PBR Map...",
"action.generate_pbr_map.desc": "Generate a PBR map (height map or metalness, emissiveness, roughness) from an existing texture",
"action.append_to_template": "Append Elements to Template...",
"action.append_to_template.desc": "Add the currently selected elements to the texture template",
@ -2120,7 +2120,7 @@
"menu.texture.pbr_channel.normal": "Normal",
"menu.texture.pbr_channel.height": "Height",
"menu.texture.pbr_channel.mer": "MER (Metalness-Emissive-Roughness)",
"menu.texture.pbr_channel.mer_subsurface": "MER Sursurface",
"menu.texture.pbr_channel.mer_subsurface": "MER Subsurface",
"menu.texture.merge_onto_texture": "Merge Onto Texture Above",
"menu.texture.edit": "Edit",
"menu.texture.edit_externally": "Edit Externally",