Fix Ctrl+S not defaulting to project if no codec

Fix temp log message
Fix issue with format condition
Rename "Control" to "Ctrl"
This commit is contained in:
JannisX11 2020-07-24 20:59:24 +02:00
parent 49da439264
commit e1d183b76c
4 changed files with 4 additions and 6 deletions

View File

@ -871,8 +871,8 @@ BARS.defineActions(function() {
click: function () {
if (isApp) {
saveTextures()
if (Format.codec && Format.codec.compile) {
if (ModelMeta.export_path) {
if (Format) {
if (ModelMeta.export_path && Format.codec && Format.codec.compile) {
Format.codec.write(Format.codec.compile(), ModelMeta.export_path)
} else if (ModelMeta.save_path) {
Codecs.project.write(Codecs.project.compile(), ModelMeta.save_path);

View File

@ -130,8 +130,6 @@ var Undo = {
var scope = this;
this.aspects = aspects;
templog(aspects)
if (aspects.selection) {
this.selection = []
selected.forEach(function(obj) {

View File

@ -28,7 +28,7 @@ const Condition = function(condition, context) {
return condition(context)
} else if (typeof condition === 'object') {
if (condition.modes instanceof Array && condition.modes.includes(Modes.id) === false) return false;
if (condition.formats instanceof Array && Format && condition.formats.includes(Format.id) === false) return false;
if (condition.formats instanceof Array && condition.formats.includes(Format.id) === false) return false;
if (condition.tools instanceof Array && window.Toolbox && condition.tools.includes(Toolbox.selected.id) === false) return false;
if (condition.method instanceof Function) {

View File

@ -76,7 +76,7 @@
"format.optifine_part.desc": "JPM part for OptiFine entity models",
"keys.mouse": "Mouse Button %0",
"keys.ctrl": "Control",
"keys.ctrl": "Ctrl",
"keys.shift": "Shift",
"keys.alt": "Alt",
"keys.meta": "Cmd",