[fixes #697] Fixed issue of empty sky option being blank on re-open

This commit is contained in:
Sibo Van Gool 2021-07-17 21:10:52 +02:00 committed by Billy Olsen
parent c1537210d7
commit c95d7df327
2 changed files with 6 additions and 13 deletions

View File

@ -187,18 +187,6 @@ public class PhotoStudioGetter {
s = Orbit.instance;
else if (Storm.class.isAssignableFrom(cl))
s = Storm.instance;
else {
// Case where sky is a dummy sky, displaying <none>
s = new Sky() {
@Override
public void draw(com.jogamp.opengl.GL2 gl, TextureCache cache) { }
@Override
public String toString() {
return Application.getTranslator().get("DecalModel.lbl.select");
}
};
}
}
catch (ClassNotFoundException e) {
log.info("Could not load sky class '" + content + "'.");

View File

@ -267,7 +267,12 @@ public class PhotoSettingsConfig extends JTabbedPane {
}
});
setSelectedItem(p.getSky());
if (p.getSky() != null) {
setSelectedItem(p.getSky());
}
else {
setSelectedItem(noSky);
}
}
}, "wrap");