mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-04-06 17:31:09 +08:00
FIx #2720 Open Parent & Adopt Textures still does an action when dismissing dialog
This commit is contained in:
parent
095ed3ef76
commit
e36c119082
@ -535,6 +535,8 @@ window.MessageBox = class MessageBox extends Dialog {
|
||||
super(options.id, options);
|
||||
this.options = options;
|
||||
if (!options.buttons) this.buttons = ['dialog.ok'];
|
||||
this.cancelIndex = Math.min(this.buttons.length-1, this.cancelIndex);
|
||||
this.confirmIndex = Math.min(this.buttons.length-1, this.confirmIndex);
|
||||
this.callback = callback;
|
||||
}
|
||||
close(button, result, event) {
|
||||
|
@ -453,7 +453,7 @@ var codec = new Codec('java_block', {
|
||||
open_with_textures: {text: 'message.child_model_only.open_with_textures', condition: Texture.all.length > 0}
|
||||
}
|
||||
}, (result) => {
|
||||
if (result) {
|
||||
if (typeof result == 'string') {
|
||||
let parent = model.parent.replace(/\w+:/, '');
|
||||
let path_arr = path.split(osfs);
|
||||
let index = path_arr.length - path_arr.indexOf('models');
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "Blockbench",
|
||||
"version": "4.12.1",
|
||||
"version": "4.12.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "Blockbench",
|
||||
"version": "4.12.1",
|
||||
"version": "4.12.3",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.1.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user