sunrize 1.5.8 → 1.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -345,7 +345,12 @@ module .exports = class Application
|
|
|
345
345
|
},
|
|
346
346
|
{ type: "separator" },
|
|
347
347
|
{
|
|
348
|
-
|
|
348
|
+
label: _("Close"),
|
|
349
|
+
accelerator: "CmdOrCtrl+W",
|
|
350
|
+
click: () =>
|
|
351
|
+
{
|
|
352
|
+
this .mainWindow .webContents .send ("close");
|
|
353
|
+
},
|
|
349
354
|
},
|
|
350
355
|
],
|
|
351
356
|
},
|
|
@@ -373,28 +378,13 @@ module .exports = class Application
|
|
|
373
378
|
},
|
|
374
379
|
{ type: "separator" },
|
|
375
380
|
{
|
|
376
|
-
|
|
377
|
-
accelerator: "CmdOrCtrl+X",
|
|
378
|
-
click: () =>
|
|
379
|
-
{
|
|
380
|
-
this .mainWindow .webContents .send ("cut");
|
|
381
|
-
},
|
|
381
|
+
role: "cut",
|
|
382
382
|
},
|
|
383
383
|
{
|
|
384
|
-
|
|
385
|
-
accelerator: "CmdOrCtrl+C",
|
|
386
|
-
click: () =>
|
|
387
|
-
{
|
|
388
|
-
this .mainWindow .webContents .send ("copy");
|
|
389
|
-
},
|
|
384
|
+
role: "copy",
|
|
390
385
|
},
|
|
391
386
|
{
|
|
392
|
-
|
|
393
|
-
accelerator: "CmdOrCtrl+V",
|
|
394
|
-
click: () =>
|
|
395
|
-
{
|
|
396
|
-
this .mainWindow .webContents .send ("paste");
|
|
397
|
-
},
|
|
387
|
+
role: "paste",
|
|
398
388
|
},
|
|
399
389
|
{
|
|
400
390
|
label: _("Delete"),
|
|
@@ -889,8 +879,6 @@ module .exports = class Application
|
|
|
889
879
|
{ role: "editMenu" },
|
|
890
880
|
]));
|
|
891
881
|
|
|
892
|
-
console .log (filters)
|
|
893
|
-
|
|
894
882
|
const response = await electron .dialog .showOpenDialog ({
|
|
895
883
|
defaultPath: defaultPath,
|
|
896
884
|
properties: ["openFile", "multiSelections"],
|
|
@@ -54,11 +54,14 @@ module .exports = class Document extends Interface
|
|
|
54
54
|
electron .ipcRenderer .on ("scene-properties", (event) => require ("../Editors/SceneProperties") .open ());
|
|
55
55
|
electron .ipcRenderer .on ("close", (event) => this .close ());
|
|
56
56
|
|
|
57
|
-
electron .ipcRenderer .on ("undo",
|
|
58
|
-
electron .ipcRenderer .on ("redo",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
electron .ipcRenderer .on ("undo", () => this .undo ());
|
|
58
|
+
electron .ipcRenderer .on ("redo", () => this .redo ());
|
|
59
|
+
|
|
60
|
+
$("body")
|
|
61
|
+
.on ("cut", () => this .cut ())
|
|
62
|
+
.on ("copy", () => this .copy ())
|
|
63
|
+
.on ("paste", () => this .paste ());
|
|
64
|
+
|
|
62
65
|
electron .ipcRenderer .on ("delete", () => this .delete ());
|
|
63
66
|
|
|
64
67
|
electron .ipcRenderer .on ("primitive-quality", (event, value) => this .setPrimitiveQuality (value));
|
|
@@ -461,17 +464,29 @@ Viewpoint {
|
|
|
461
464
|
|
|
462
465
|
cut ()
|
|
463
466
|
{
|
|
467
|
+
if (this .activeElementIsInputOrOutput ())
|
|
468
|
+
return;
|
|
469
|
+
|
|
464
470
|
this .sidebar .outlineEditor .cutNodes ();
|
|
471
|
+
return false;
|
|
465
472
|
}
|
|
466
473
|
|
|
467
474
|
copy ()
|
|
468
475
|
{
|
|
476
|
+
if (this .activeElementIsInputOrOutput ())
|
|
477
|
+
return;
|
|
478
|
+
|
|
469
479
|
this .sidebar .outlineEditor .copyNodes ();
|
|
480
|
+
return false;
|
|
470
481
|
}
|
|
471
482
|
|
|
472
483
|
paste ()
|
|
473
484
|
{
|
|
485
|
+
if (this .activeElementIsInputOrOutput ())
|
|
486
|
+
return;
|
|
487
|
+
|
|
474
488
|
this .sidebar .outlineEditor .pasteNodes ();
|
|
489
|
+
return false;
|
|
475
490
|
}
|
|
476
491
|
|
|
477
492
|
delete ()
|
package/src/Application/Tabs.js
CHANGED
|
@@ -54,6 +54,7 @@ module .exports = new class Tabs
|
|
|
54
54
|
electron .ipcRenderer .on ("save-file", (event) => this .saveFile ());
|
|
55
55
|
electron .ipcRenderer .on ("save-file-as", (event, filePath) => this .saveFileAs (filePath));
|
|
56
56
|
electron .ipcRenderer .on ("save-all-files", (event) => this .saveAllFiles ());
|
|
57
|
+
electron .ipcRenderer .on ("close", (event) => this .tabs .getActiveTab () ?.close (true));
|
|
57
58
|
electron .ipcRenderer .on ("quit", (event) => this .quit ());
|
|
58
59
|
|
|
59
60
|
electron .ipcRenderer .on ("toggle-developer-tools", (event) => this .tabs .getActiveTab () .webview .openDevTools ());
|