Skip to content

Commit aa5dba9

Browse files
committed
fixing relight and mutex problems
1 parent 24c5da1 commit aa5dba9

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

relight/history.h

+26-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,32 @@ class Event {
1515
Sphere sphere; //when a sphere is modified or removed.
1616

1717
Event() {}
18-
Event(Type t, int id, Sphere &sp): type(t), sphere_id(id), sphere(sp) {}
18+
Event(Type t, int id, Sphere &sp): type(t), sphere_id(id) {
19+
copySphere(sp);
20+
}
21+
Event(const Event &e) {
22+
type = e.type;
23+
sphere_id = e.sphere_id;
24+
copySphere(e.sphere);
25+
}
26+
void copySphere(const Sphere &sp) {
27+
sphere.border = sp.border;
28+
sphere.center = sp.center;
29+
sphere.directions = sp.directions;
30+
sphere.eAngle = sp.eAngle;
31+
sphere.eFocal = sp.eFocal;
32+
sphere.eHeight = sp.eHeight;
33+
sphere.eWidth = sp.eWidth;
34+
sphere.ellipse = sp.ellipse;
35+
sphere.fitted = sp.fitted;
36+
sphere.image_size = sp.image_size;
37+
sphere.inner = sp.inner;
38+
sphere.lights = sp.lights;
39+
sphere.radius = sp.radius;
40+
sphere.smallradius = sp.smallradius;
41+
sphere.sphereImg = sp.sphereImg;
42+
sphere.thumbs = sp.thumbs;
43+
}
1944
};
2045

2146

relight/mainwindow.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ int MainWindow::detectHighlight(int n) {
825825

826826
for(auto sphere: project.spheres) {
827827
if(sphere->fitted) {
828-
sphere->findHighlight(img, n);
828+
sphere->findHighlight(img, n, project.images[n].skip);
829829
}
830830
}
831831
return 1;

0 commit comments

Comments
 (0)