Fix screenshot in display mode using wrong camera

This commit is contained in:
JannisX11 2020-10-30 15:54:33 +01:00
parent 5f70af14c4
commit 11af463d70
2 changed files with 5 additions and 3 deletions

View File

@ -1561,7 +1561,9 @@ function initCanvas() {
two: main_preview,
three: new Preview({id: 'three'}).loadAnglePreset(DefaultCameraPresets[3]),
four: new Preview({id: 'four'}).loadAnglePreset(DefaultCameraPresets[5]),
current: main_preview
get current() {
return Preview.selected;
}
}
//emptyMaterial
@ -1877,7 +1879,7 @@ BARS.defineActions(function() {
icon: 'fa-cubes',
category: 'view',
keybind: new Keybind({key: 80, ctrl: true}),
click: function () {quad_previews.current.screenshot()}
click: function () {Preview.selected.screenshot()}
})
new Action('record_model_gif', {
icon: 'local_movies',

View File

@ -92,7 +92,7 @@ const Painter = {
// Preview Brush
startPaintToolCanvas(data, e) {
if (!data && Toolbox.selected.id == 'color_picker') {
var preview = quad_previews.current
var preview = Preview.selected;
if (preview && preview.background && preview.background.imgtag) {
var ctx = Painter.getCanvas(preview.background.imgtag).getContext('2d')