Ensure to set old material to doc material

This commit is contained in:
SiboVG 2024-08-08 23:57:13 +02:00
parent 2a53ee9420
commit 117d7d79df

View File

@ -227,6 +227,7 @@ public class MaterialEditPanel extends JPanel {
// If the application material was already in use, add the old application material as a document material
Map<OpenRocketDocument, List<RocketComponent>> components = getComponentsThatUseMaterial(m);
if (!components.isEmpty()) {
m.setDocumentMaterial(true);
for (OpenRocketDocument doc: components.keySet()) {
doc.getDocumentPreferences().addMaterial(m);
}