diff --git a/MiBand4Editor/src/elements/BGItem.java b/MiBand4Editor/src/elements/BGItem.java index 7c3b4f1..bd853cc 100644 --- a/MiBand4Editor/src/elements/BGItem.java +++ b/MiBand4Editor/src/elements/BGItem.java @@ -14,6 +14,7 @@ import javax.swing.JPanel; import helpers.StaticHelpers; +import main.MiBand4Editor; public class BGItem extends Element{ @@ -25,8 +26,7 @@ public class BGItem extends Element{ int y; public BGItem(File selFile, int i, int x, int y) throws IOException { - String temp = new File(".").getAbsolutePath(); - String absolutePath = temp.substring(0,temp.length()-1)+"data"; + String absolutePath = MiBand4Editor.currentPath.getAbsolutePath(); file = new File(absolutePath+"\\BGItem"+i+".png"); Files.copy(Paths.get(selFile.getAbsolutePath()), Paths.get(file.getAbsolutePath()),StandardCopyOption.REPLACE_EXISTING); diff --git a/MiBand4Editor/src/elements/activity/Calories.java b/MiBand4Editor/src/elements/activity/Calories.java index e3249e7..d2e788c 100644 --- a/MiBand4Editor/src/elements/activity/Calories.java +++ b/MiBand4Editor/src/elements/activity/Calories.java @@ -17,6 +17,7 @@ import display.TopalignedLabel; import elements.Element; import elements.basic.Number; +import helpers.StaticHelpers; import helpers.UnequalDimensionsException; import main.MiBand4Editor; @@ -43,10 +44,12 @@ public JPanel getPreview(int w, int h) throws IOException { TopalignedLabel label2 = new TopalignedLabel(stepsGoal.getImage(0)); TopalignedLabel label3 = new TopalignedLabel(stepsGoal.getImage(0)); TopalignedLabel label4 = new TopalignedLabel(stepsGoal.getImage(0)); + TopalignedLabel label5 = new TopalignedLabel(StaticHelpers.getJLabelFromImage(delimiterImageIndex)); panel.add(label1); panel.add(label2); panel.add(label3); panel.add(label4); + panel.add(label5); panel.setName(this.getClass().toString()); panel.setOpaque(false);