From 44d45f5a6d941fb06763d9a5c323b0589f5d2ea5 Mon Sep 17 00:00:00 2001 From: Toni Helenius Date: Sun, 28 Apr 2024 13:11:29 +0300 Subject: [PATCH] Unnecessary array operation and code in comments --- .../multiview/MaterialEditorTopComponent.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.java b/jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.java index e264a70b..c448aa80 100644 --- a/jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.java +++ b/jme3-materialeditor/src/com/jme3/gde/materials/multiview/MaterialEditorTopComponent.java @@ -600,19 +600,10 @@ public void setMatDefList(final String[] matDefs, String selected) { jComboBox1.addItem(""); List matDefList = Arrays.asList(matDefs); Collections.sort(matDefList); - String[] sortedMatDefs = matDefList.toArray(String[]::new); - for (String string : sortedMatDefs) { - jComboBox1.addItem(string); + for (String matDef : matDefList) { + jComboBox1.addItem(matDef); } -// jComboBox1.addItem("Common/MatDefs/Light/Lighting.j3md"); -// jComboBox1.addItem("Common/MatDefs/Misc/Unshaded.j3md"); -// jComboBox1.addItem("Common/MatDefs/Misc/Particle.j3md"); -// jComboBox1.addItem("Common/MatDefs/Misc/Sky.j3md"); -// jComboBox1.addItem("Common/MatDefs/Gui/Gui.j3md"); -// jComboBox1.addItem("Common/MatDefs/Terrain/TerrainLighting.j3md"); -// jComboBox1.addItem("Common/MatDefs/Terrain/Terrain.j3md"); -// jComboBox1.addItem("Common/MatDefs/Misc/ShowNormals.j3md"); jComboBox1.setSelectedItem(selected); materialFile = prop; }