Fix #1891 Cannot add reference images in orthographic

Fix reference image error
This commit is contained in:
Jannis 2023-07-09 10:53:04 +02:00
parent e4ad887923
commit 9f7fe3719d
2 changed files with 3 additions and 4 deletions

View File

@ -939,7 +939,6 @@ window.MessageBox = class MessageBox extends Dialog {
close(button, result, event) {
if (this.callback) {
let allow_close = this.callback(button, result, event);
console.log(allow_close)
if (allow_close === false) return;
}
this.hide();

View File

@ -100,7 +100,7 @@ class ReferenceImage {
}
addAsReference(save) {
Project.reference_images.push(this);
if (Preview.selected && Preview.selected.isOrtho) this.changeLayer('blueprint');
if (Preview.selected && Preview.selected.angle) this.changeLayer('blueprint');
this.scope = 'project';
this.update();
if (save) this.save();
@ -108,7 +108,7 @@ class ReferenceImage {
}
addAsGlobalReference(save) {
ReferenceImage.global.push(this);
if (Preview.selected && Preview.selected.isOrtho) this.changeLayer('blueprint');
if (Preview.selected && Preview.selected.angle) this.changeLayer('blueprint');
this.scope = 'global';
this.update();
if (save) this.save();
@ -256,7 +256,7 @@ class ReferenceImage {
pos_x += preview.width/2;
pos_y += preview.height/2;
if (quad_previews.enabled) {
if (Preview.split_screen.enabled) {
pos_x += preview.node.parentElement.offsetLeft;
pos_y += preview.node.parentElement.offsetTop;
}