fixed bugs in the Photo Renderer
This commit is contained in:
parent
efd1656fc8
commit
0979cff505
@ -2034,6 +2034,7 @@ PhotoFrame.fileFilter.png = PNG Image
|
||||
PhotoFrame.menu.edit.copy = Copy Image
|
||||
PhotoFrame.menu.edit.copy.desc = Copy image to clipboard
|
||||
PhotoFrame.menu.edit.settings = Photo Settings
|
||||
PhotoFrame.menu.edit.unk = Unknown Setting
|
||||
PhotoFrame.menu.window = Window
|
||||
PhotoFrame.menu.window.size = Size
|
||||
PhotoFrame.menu.window.size.portrait = {0} Portrait
|
||||
|
@ -206,7 +206,7 @@ public class PhotoFrame extends JFrame {
|
||||
menu = new JMenu(trans.get("main.menu.edit"));
|
||||
menu.setMnemonic(KeyEvent.VK_E);
|
||||
// // Rocket editing
|
||||
menu.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.menu.Rocketedt"));
|
||||
menu.getAccessibleContext().setAccessibleDescription(trans.get("PhotoFrame.menu.edit.unk"));
|
||||
menubar.add(menu);
|
||||
|
||||
Action action = new AbstractAction(trans.get("PhotoFrame.menu.edit.copy")) {
|
||||
|
@ -45,6 +45,7 @@ import net.sf.openrocket.gui.figure3d.TextureCache;
|
||||
import net.sf.openrocket.gui.figure3d.photo.exhaust.FlameRenderer;
|
||||
import net.sf.openrocket.gui.main.Splash;
|
||||
import net.sf.openrocket.motor.Motor;
|
||||
import net.sf.openrocket.motor.MotorConfiguration;
|
||||
import net.sf.openrocket.rocketcomponent.FlightConfiguration;
|
||||
import net.sf.openrocket.rocketcomponent.FlightConfigurationId;
|
||||
import net.sf.openrocket.rocketcomponent.MotorMount;
|
||||
@ -95,16 +96,6 @@ public class PhotoPanel extends JPanel implements GLEventListener {
|
||||
rr = new RealisticRenderer(doc);
|
||||
rr.init(drawable);
|
||||
|
||||
doc.getDefaultConfiguration().addChangeListener(
|
||||
new StateChangeListener() {
|
||||
@Override
|
||||
public void stateChanged(EventObject e) {
|
||||
log.debug("Repainting on config state change");
|
||||
needUpdate = true;
|
||||
PhotoPanel.this.repaint();
|
||||
}
|
||||
});
|
||||
|
||||
doc.addDocumentChangeListener(new DocumentChangeListener() {
|
||||
@Override
|
||||
public void documentChanged(DocumentChangeEvent event) {
|
||||
@ -422,13 +413,12 @@ public class PhotoPanel extends JPanel implements GLEventListener {
|
||||
final FlightConfigurationId motorID = configuration.getFlightConfigurationID();
|
||||
|
||||
|
||||
final Iterator<RocketComponent> iter = configuration.getActiveComponents().iterator();
|
||||
while( iter.hasNext()){
|
||||
RocketComponent comp = iter.next();
|
||||
if( comp instanceof MotorMount){
|
||||
|
||||
final MotorMount mount = (MotorMount) comp;
|
||||
int curStageNumber = comp.getStageNumber();
|
||||
final Iterator<MotorConfiguration> iter = configuration.getActiveMotors().iterator();
|
||||
while( iter.hasNext()){
|
||||
MotorConfiguration curConfig = iter.next();
|
||||
final MotorMount mount = curConfig.getMount();
|
||||
int curStageNumber = ((RocketComponent)mount).getStageNumber();
|
||||
|
||||
//If this mount is not in currentStage continue on to the next one.
|
||||
if( curStageNumber != bottomStageNumber ){
|
||||
@ -450,7 +440,6 @@ public class PhotoPanel extends JPanel implements GLEventListener {
|
||||
gl.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gl.glDisable(GL.GL_BLEND);
|
||||
gl.glFrontFace(GL.GL_CCW);
|
||||
|
Loading…
x
Reference in New Issue
Block a user