diff --git a/js/interface/actions.js b/js/interface/actions.js index d9f36097..bfa0d605 100644 --- a/js/interface/actions.js +++ b/js/interface/actions.js @@ -1478,6 +1478,14 @@ const BARS = { }) //File + new Action('new_window', { + icon: 'open_in_new', + category: 'file', + condition: isApp, + click: function () { + ipcRenderer.send('new-window'); + } + }) new Action('open_model_folder', { icon: 'folder_open', category: 'file', diff --git a/js/interface/menu.js b/js/interface/menu.js index 0831736a..d66fc440 100644 --- a/js/interface/menu.js +++ b/js/interface/menu.js @@ -542,6 +542,7 @@ const MenuBar = { }, 'open_model', 'open_from_link', + 'new_window', '_', 'save_project', 'save_project_as', diff --git a/js/texturing/textures.js b/js/texturing/textures.js index 462df4ca..3e7dc838 100644 --- a/js/texturing/textures.js +++ b/js/texturing/textures.js @@ -782,6 +782,7 @@ class Texture { showContextMenu(event) { var scope = this; scope.select() + Prop.active_panel = 'textures' this.menu.open(event, scope) } openMenu() { @@ -1135,14 +1136,7 @@ class Texture { name: 'menu.texture.change', click: function(texture) { texture.reopen()} }, - { - icon: 'delete', - name: 'generic.delete', - click: function(texture) { - Undo.initEdit({textures: [texture], selected_texture: true, bitmap: true}) - texture.remove() - Undo.finishEdit('Delete texture', {textures: [], selected_texture: true, bitmap: true}) - }}, + 'delete', '_', { icon: 'list', diff --git a/lang/en.json b/lang/en.json index 9931acb7..0625f3b9 100644 --- a/lang/en.json +++ b/lang/en.json @@ -819,6 +819,8 @@ "action.project_window": "Project...", "action.project_window.desc": "Opens the project window, where you can edit metadata of your model", + "action.new_window": "New Window", + "action.new_window.desc": "Opens a new Blockbench window", "action.open_model_folder": "Open Model Folder", "action.open_model_folder.desc": "Opens the folder that the model is contained in", "action.open_backup_folder": "Open Backup Folder", diff --git a/main.js b/main.js index 89466ec7..4f3546fb 100644 --- a/main.js +++ b/main.js @@ -184,6 +184,9 @@ ipcMain.on('edit-launch-setting', (event, arg) => { ipcMain.on('add-recent-project', (event, path) => { app.addRecentDocument(path); }) +ipcMain.on('new-window', (event, path) => { + createWindow(true); +}) ipcMain.on('request-color-picker', async (event, arg) => { const color = await getColorHexRGB().catch((error) => { console.warn('[Error] Failed to pick color', error)