Fix some mistakes in merge conflicts

This commit is contained in:
SiboVG 2024-04-06 15:49:23 +02:00
parent 69c995b829
commit c272a140ee
14 changed files with 54 additions and 14 deletions

View File

@ -18,7 +18,7 @@ import java.util.HashMap;
public class PodHandler extends PositionDependentHandler<ComponentAssembly> { public class PodHandler extends PositionDependentHandler<ComponentAssembly> {
/** /**
* The OpenRocket BodyTube. * The OpenRocket Pod.
*/ */
private final RocketComponent parent; private final RocketComponent parent;
private final PodSet podSet; private final PodSet podSet;

View File

@ -989,7 +989,7 @@ ComponentCfgDlg.MultiComponentEdit.ttip = <html>:أنت تقوم بتعديل ا
ComponentCfgDlg.Modify = تعديل ComponentCfgDlg.Modify = تعديل
ComponentCfgDlg.ModifyComponents = تعديل المكونات ComponentCfgDlg.ModifyComponents = تعديل المكونات
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = فصل ComponentAssemblyConfig.tab.Separation = فصل
ComponentAssemblyConfig.tab.Separation.ttip = خيارات فصل المرحلة ComponentAssemblyConfig.tab.Separation.ttip = خيارات فصل المرحلة
ComponentAssemblyConfig.separation.lbl.title = :حدد متى تنفصل هذه المرحلة ComponentAssemblyConfig.separation.lbl.title = :حدد متى تنفصل هذه المرحلة

View File

@ -675,7 +675,7 @@ CenteringRingCfg.tab.Generalproperties = Obecn
ComponentCfgDlg.configuration = konfigurace ComponentCfgDlg.configuration = konfigurace
ComponentCfgDlg.Modify = Uprav ComponentCfgDlg.Modify = Uprav
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Oddelení ComponentAssemblyConfig.tab.Separation = Oddelení
ComponentAssemblyConfig.tab.Separation.ttip = Vlastnosti oddelení stupne ComponentAssemblyConfig.tab.Separation.ttip = Vlastnosti oddelení stupne
ComponentAssemblyConfig.separation.lbl.title = Oznac kdy se má tento stupn oddelit: ComponentAssemblyConfig.separation.lbl.title = Oznac kdy se má tento stupn oddelit:

View File

@ -732,7 +732,7 @@ CenteringRingCfg.tab.Generalproperties = Allgemeine Eigenschaften
ComponentCfgDlg.configuration = Konfiguration ComponentCfgDlg.configuration = Konfiguration
ComponentCfgDlg.Modify = Verändern ComponentCfgDlg.Modify = Verändern
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Stufentrennung ComponentAssemblyConfig.tab.Separation = Stufentrennung
ComponentAssemblyConfig.tab.Separation.ttip = Stufentrennungs-Optionen ComponentAssemblyConfig.tab.Separation.ttip = Stufentrennungs-Optionen
ComponentAssemblyConfig.separation.lbl.title = Auswählen, wenn diese Stufe getrennt wird: ComponentAssemblyConfig.separation.lbl.title = Auswählen, wenn diese Stufe getrennt wird:

View File

@ -1056,7 +1056,7 @@ StageAction.Stage = Etapa
ComponentAssemblyConfig.separation.lbl.plus = m\u00e1s ComponentAssemblyConfig.separation.lbl.plus = m\u00e1s
ComponentAssemblyConfig.separation.lbl.seconds = segundos ComponentAssemblyConfig.separation.lbl.seconds = segundos
ComponentAssemblyConfig.separation.lbl.title = Seleccione el instante de separaci\u00f3n de esta etapa: ComponentAssemblyConfig.separation.lbl.title = Seleccione el instante de separaci\u00f3n de esta etapa:
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Separaci\u00f3n ComponentAssemblyConfig.tab.Separation = Separaci\u00f3n
ComponentAssemblyConfig.tab.Separation.ttip = Opciones de separaci\u00f3n de etapa ComponentAssemblyConfig.tab.Separation.ttip = Opciones de separaci\u00f3n de etapa

View File

@ -1049,7 +1049,7 @@ StageAction.Stage = Etage
ComponentAssemblyConfig.separation.lbl.plus = plus ComponentAssemblyConfig.separation.lbl.plus = plus
ComponentAssemblyConfig.separation.lbl.seconds = secondes ComponentAssemblyConfig.separation.lbl.seconds = secondes
ComponentAssemblyConfig.separation.lbl.title = Choisir lorsque cet \u00E9tage se s\u00E9pare: ComponentAssemblyConfig.separation.lbl.title = Choisir lorsque cet \u00E9tage se s\u00E9pare:
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = S\u00E9paration ComponentAssemblyConfig.tab.Separation = S\u00E9paration
ComponentAssemblyConfig.tab.Separation.ttip = Options de s\u00E9paration de l'\u00E9tage ComponentAssemblyConfig.tab.Separation.ttip = Options de s\u00E9paration de l'\u00E9tage

View File

@ -734,7 +734,7 @@ CenteringRingCfg.tab.Generalproperties = Proprieta' generali
ComponentCfgDlg.configuration = (configurazione) ComponentCfgDlg.configuration = (configurazione)
ComponentCfgDlg.Modify = Modifica ComponentCfgDlg.Modify = Modifica
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Separazione ComponentAssemblyConfig.tab.Separation = Separazione
ComponentAssemblyConfig.tab.Separation.ttip = Opzioni della separazione dello stadio ComponentAssemblyConfig.tab.Separation.ttip = Opzioni della separazione dello stadio
ComponentAssemblyConfig.separation.lbl.title = Seleziona quando questo stadio separa: ComponentAssemblyConfig.separation.lbl.title = Seleziona quando questo stadio separa:

View File

@ -764,7 +764,7 @@ CenteringRingCfg.tab.Generalproperties = \u4E00\u822C
ComponentCfgDlg.configuration = \u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3 ComponentCfgDlg.configuration = \u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3
ComponentCfgDlg.Modify = \u5909\u66F4 ComponentCfgDlg.Modify = \u5909\u66F4
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = \u5206\u96E2 ComponentAssemblyConfig.tab.Separation = \u5206\u96E2
ComponentAssemblyConfig.tab.Separation.ttip = \u30B9\u30C6\u30FC\u30B8\u5206\u96E2\u30AA\u30D7\u30B7\u30E7\u30F3 ComponentAssemblyConfig.tab.Separation.ttip = \u30B9\u30C6\u30FC\u30B8\u5206\u96E2\u30AA\u30D7\u30B7\u30E7\u30F3
ComponentAssemblyConfig.separation.lbl.title = \u30B9\u30C6\u30FC\u30B8\u304C\u5206\u96E2\u3059\u308B\u6642\u523B\u306E\u9078\u629E\uFF1A ComponentAssemblyConfig.separation.lbl.title = \u30B9\u30C6\u30FC\u30B8\u304C\u5206\u96E2\u3059\u308B\u6642\u523B\u306E\u9078\u629E\uFF1A

View File

@ -940,7 +940,7 @@ CenteringRingCfg.tab.Generalproperties = Algemene eigenschappen
ComponentCfgDlg.configuration = configuratie ComponentCfgDlg.configuration = configuratie
ComponentCfgDlg.Modify = Wijzigen ComponentCfgDlg.Modify = Wijzigen
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Afscheiding ComponentAssemblyConfig.tab.Separation = Afscheiding
ComponentAssemblyConfig.tab.Separation.ttip = Etape afscheidingsopties ComponentAssemblyConfig.tab.Separation.ttip = Etape afscheidingsopties
ComponentAssemblyConfig.separation.lbl.title = Selecteer wanneer deze etape afscheidt: ComponentAssemblyConfig.separation.lbl.title = Selecteer wanneer deze etape afscheidt:
@ -949,7 +949,7 @@ ComponentAssemblyConfig.separation.lbl.seconds = seconden
ComponentAssemblyConfig.parallel.radius = Radiale Afstand ComponentAssemblyConfig.parallel.radius = Radiale Afstand
ComponentAssemblyConfig.parallel.angle = Hoek ComponentAssemblyConfig.parallel.angle = Hoek
ComponentAssemblyConfig.parallel.count = Aantal kopieën ComponentAssemblyConfig.parallel.count = Aantal kopieën
StageConfig.parallel.offset = Offset-waarde ComponentAssemblyConfig.parallel.offset = Offset-waarde
!EllipticalFinSetConfig !EllipticalFinSetConfig
EllipticalFinSetCfg.Nbroffins = Aantal vinnen: EllipticalFinSetCfg.Nbroffins = Aantal vinnen:

View File

@ -679,7 +679,7 @@ ComponentInfo.EngineBlock = <b>Blokada silnika</b> unieruchamia silnik wewn\u01
ComponentCfgDlg.configuration = konfiguracja ComponentCfgDlg.configuration = konfiguracja
ComponentCfgDlg.Modify = Zmodyfikuj ComponentCfgDlg.Modify = Zmodyfikuj
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Separacja ComponentAssemblyConfig.tab.Separation = Separacja
ComponentAssemblyConfig.tab.Separation.ttip = Opcje oddzielenia cz\u0142onu ComponentAssemblyConfig.tab.Separation.ttip = Opcje oddzielenia cz\u0142onu
ComponentAssemblyConfig.separation.lbl.title = Ustal moment oddzielenia cz\u0142onu: ComponentAssemblyConfig.separation.lbl.title = Ustal moment oddzielenia cz\u0142onu:

View File

@ -969,7 +969,7 @@ ComponentCfgDlg.MultiComponentEdit.ttip = <html>\u0412\u044B \u0440\u0435\u0434\
ComponentCfgDlg.Modify = \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C ComponentCfgDlg.Modify = \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C
ComponentCfgDlg.ModifyComponents = \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u044B ComponentCfgDlg.ModifyComponents = \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u044B
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = \u0420\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u0435 ComponentAssemblyConfig.tab.Separation = \u0420\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u0435
ComponentAssemblyConfig.tab.Separation.ttip = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0442\u0443\u043F\u0435\u043D\u0435\u0439 ComponentAssemblyConfig.tab.Separation.ttip = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0442\u0443\u043F\u0435\u043D\u0435\u0439
ComponentAssemblyConfig.separation.lbl.title = \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u043A\u043E\u0433\u0434\u0430 \u044D\u0442\u0430 \u0441\u0442\u0443\u043F\u0435\u043D\u044C \u043E\u0442\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F: ComponentAssemblyConfig.separation.lbl.title = \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u043A\u043E\u0433\u0434\u0430 \u044D\u0442\u0430 \u0441\u0442\u0443\u043F\u0435\u043D\u044C \u043E\u0442\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F:

View File

@ -837,7 +837,7 @@ CenteringRingCfg.tab.Generalproperties = General properties
ComponentCfgDlg.configuration = configuration ComponentCfgDlg.configuration = configuration
ComponentCfgDlg.Modify = Modify ComponentCfgDlg.Modify = Modify
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = Separation ComponentAssemblyConfig.tab.Separation = Separation
ComponentAssemblyConfig.tab.Separation.ttip = Stage separation options ComponentAssemblyConfig.tab.Separation.ttip = Stage separation options
ComponentAssemblyConfig.separation.lbl.title = Select when this stage separates: ComponentAssemblyConfig.separation.lbl.title = Select when this stage separates:

View File

@ -1124,7 +1124,7 @@ StageAction.Stage = \u7EA7
ComponentAssemblyConfig.separation.lbl.plus = \u52A0 ComponentAssemblyConfig.separation.lbl.plus = \u52A0
ComponentAssemblyConfig.separation.lbl.seconds = \u79D2 ComponentAssemblyConfig.separation.lbl.seconds = \u79D2
ComponentAssemblyConfig.separation.lbl.title = \u8BBE\u5B9A\u5206\u79BB\u65F6\u673A: ComponentAssemblyConfig.separation.lbl.title = \u8BBE\u5B9A\u5206\u79BB\u65F6\u673A:
!StageConfig !ComponentAssemblyConfig
ComponentAssemblyConfig.tab.Separation = \u5206\u79BB ComponentAssemblyConfig.tab.Separation = \u5206\u79BB
ComponentAssemblyConfig.tab.Separation.ttip = \u591A\u7EA7\u5206\u79BB\u9009\u9879 ComponentAssemblyConfig.tab.Separation.ttip = \u591A\u7EA7\u5206\u79BB\u9009\u9879

View File

@ -18,11 +18,13 @@ import info.openrocket.core.file.wavefrontobj.ObjUtils;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JCheckBox; import javax.swing.JCheckBox;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JSeparator; import javax.swing.JSeparator;
@ -32,6 +34,7 @@ import javax.swing.UIManager;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.Color; import java.awt.Color;
import java.awt.Component;
import java.awt.Window; import java.awt.Window;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -56,6 +59,8 @@ public class OBJOptionChooser extends JPanel {
private final JCheckBox exportAsSeparateFiles; private final JCheckBox exportAsSeparateFiles;
private final JCheckBox removeOffset; private final JCheckBox removeOffset;
private final JCheckBox triangulate; private final JCheckBox triangulate;
private final JLabel tmLabel;
private final JComboBox<ObjUtils.TriangulationMethod> triangulationMethod;
private final JCheckBox sRGB; private final JCheckBox sRGB;
private final JComboBox<ObjUtils.LevelOfDetail> LOD; private final JComboBox<ObjUtils.LevelOfDetail> LOD;
private final DoubleModel scalingModel; private final DoubleModel scalingModel;
@ -226,11 +231,15 @@ public class OBJOptionChooser extends JPanel {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getStateChange() == ItemEvent.SELECTED) {
tmLabel.setEnabled(true);
triangulationMethod.setEnabled(true);
// Disable the export appearance, it is not supported in combination with triangulate // Disable the export appearance, it is not supported in combination with triangulate
exportAppearance.setEnabled(false); exportAppearance.setEnabled(false);
exportAppearance.setSelected(false); exportAppearance.setSelected(false);
exportAppearance.setToolTipText(trans.get("OBJOptionChooser.checkbox.exportAppearance.ttip.triangulate")); exportAppearance.setToolTipText(trans.get("OBJOptionChooser.checkbox.exportAppearance.ttip.triangulate"));
} else { } else {
tmLabel.setEnabled(false);
triangulationMethod.setEnabled(false);
// Re-enable // Re-enable
exportAppearance.setEnabled(true); exportAppearance.setEnabled(true);
exportAppearance.setSelected(opts.isExportAppearance()); exportAppearance.setSelected(opts.isExportAppearance());
@ -239,6 +248,17 @@ public class OBJOptionChooser extends JPanel {
} }
}); });
//// Triangulation method
this.tmLabel = new JLabel(trans.get("OBJOptionChooser.lbl.triangulationMethod"));
this.tmLabel.setToolTipText(trans.get("OBJOptionChooser.lbl.triangulationMethod.ttip"));
advancedOptionsPanel.add(this.tmLabel, "spanx, split 2");
this.triangulationMethod = new JComboBox<>(ObjUtils.TriangulationMethod.values());
this.triangulationMethod.setToolTipText(trans.get("OBJOptionChooser.lbl.triangulationMethod.ttip"));
this.triangulationMethod.setRenderer(new TriangulationMethodRenderer());
destroyTheMagic(triangulationMethod);
addOptimizationListener(triangulationMethod);
advancedOptionsPanel.add(triangulationMethod, "growx, wrap unrel");
//// Level of detail //// Level of detail
JLabel LODLabel = new JLabel(trans.get("OBJOptionChooser.lbl.LevelOfDetail")); JLabel LODLabel = new JLabel(trans.get("OBJOptionChooser.lbl.LevelOfDetail"));
LODLabel.setToolTipText(trans.get("OBJOptionChooser.lbl.LevelOfDetail.ttip")); LODLabel.setToolTipText(trans.get("OBJOptionChooser.lbl.LevelOfDetail.ttip"));
@ -397,6 +417,7 @@ public class OBJOptionChooser extends JPanel {
if (!opts.isTriangulate()) { if (!opts.isTriangulate()) {
this.exportAppearance.setSelected(opts.isExportAppearance()); this.exportAppearance.setSelected(opts.isExportAppearance());
} }
this.triangulationMethod.setSelectedItem(opts.getTriangulationMethod());
this.sRGB.setSelected(opts.isUseSRGB()); this.sRGB.setSelected(opts.isUseSRGB());
this.scalingModel.setValue(opts.getScaling()); this.scalingModel.setValue(opts.getScaling());
@ -425,6 +446,7 @@ public class OBJOptionChooser extends JPanel {
opts.setExportAsSeparateFiles(exportAsSeparateFiles.isSelected()); opts.setExportAsSeparateFiles(exportAsSeparateFiles.isSelected());
opts.setRemoveOffset(removeOffset.isSelected()); opts.setRemoveOffset(removeOffset.isSelected());
opts.setTriangulate(triangulate.isSelected()); opts.setTriangulate(triangulate.isSelected());
opts.setTriangulationMethod((ObjUtils.TriangulationMethod) triangulationMethod.getSelectedItem());
opts.setUseSRGB(sRGB.isSelected()); opts.setUseSRGB(sRGB.isSelected());
opts.setScaling((float) scalingModel.getValue()); opts.setScaling((float) scalingModel.getValue());
opts.setLOD((ObjUtils.LevelOfDetail) LOD.getSelectedItem()); opts.setLOD((ObjUtils.LevelOfDetail) LOD.getSelectedItem());
@ -444,6 +466,7 @@ public class OBJOptionChooser extends JPanel {
options.setRemoveOffset(true); options.setRemoveOffset(true);
options.setScaling(1000); options.setScaling(1000);
options.setTriangulate(true); options.setTriangulate(true);
options.setTriangulationMethod(ObjUtils.TriangulationMethod.DELAUNAY);
options.setLOD(ObjUtils.LevelOfDetail.HIGH_QUALITY); options.setLOD(ObjUtils.LevelOfDetail.HIGH_QUALITY);
loadOptions(options); loadOptions(options);
@ -456,6 +479,7 @@ public class OBJOptionChooser extends JPanel {
*/ */
private boolean isOptimizedFor3DPrinting(OBJExportOptions options) { private boolean isOptimizedFor3DPrinting(OBJExportOptions options) {
return !options.isExportMotors() && !options.isExportAppearance() && options.isTriangulate() && return !options.isExportMotors() && !options.isExportAppearance() && options.isTriangulate() &&
options.getTriangulationMethod() == ObjUtils.TriangulationMethod.DELAUNAY &&
options.getLOD() == ObjUtils.LevelOfDetail.HIGH_QUALITY && options.isRemoveOffset() && options.getScaling() == 1000; options.getLOD() == ObjUtils.LevelOfDetail.HIGH_QUALITY && options.isRemoveOffset() && options.getScaling() == 1000;
} }
@ -584,6 +608,22 @@ public class OBJOptionChooser extends JPanel {
} }
} }
private static class TriangulationMethodRenderer extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
JComponent comp = (JComponent) super.getListCellRendererComponent(list,
value, index, isSelected, cellHasFocus);
if (index > -1 && value instanceof ObjUtils.TriangulationMethod) {
list.setToolTipText(((ObjUtils.TriangulationMethod) value).getTooltip());
}
return comp;
}
}
/*private void coordTransComboAction(ItemEvent e, JComboBox<Axis> otherCombo) { /*private void coordTransComboAction(ItemEvent e, JComboBox<Axis> otherCombo) {
if (e.getStateChange() != ItemEvent.SELECTED) { if (e.getStateChange() != ItemEvent.SELECTED) {
return; return;