Changeset 1436 for trunk/src/org/expeditee/importer/ImageImporter.java
- Timestamp:
- 11/05/19 16:16:11 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/importer/ImageImporter.java
r1109 r1436 34 34 import org.expeditee.gui.FrameIO; 35 35 import org.expeditee.gui.FrameUtils; 36 import org.expeditee.gui.management.ResourceManager; 36 37 import org.expeditee.items.Item; 37 38 import org.expeditee.items.Text; … … 53 54 } 54 55 55 public Item importFile(File f, Point location ) throws IOException {56 public Item importFile(File f, Point location, boolean attachToFreeItems) throws IOException { 56 57 57 58 if (location == null || f == null) { … … 87 88 } 88 89 Text source; 89 final Path imagePath = Paths.get(fullPath); 90 final Path imagesPath = Paths.get(FrameIO.IMAGES_PATH); 91 if(imagePath.startsWith(imagesPath)) 92 source = DragAndDropManager.importString("@i: " + imagePath.getFileName() + size, location); 93 else source = DragAndDropManager.importString("@i: " + fullPath + size, location); 90 Path imagePath = Paths.get(fullPath); 91 Path imagePathRelitivized = ResourceManager.relativiseImagePath(imagePath, DisplayController.getCurrentFrame()); 92 source = DragAndDropManager.importString("@i: " + imagePathRelitivized.toString() + size, location, attachToFreeItems); 93 // final Path imagesPath = Paths.get(FrameIO.IMAGES_PATH); 94 // if(imagePath.startsWith(imagesPath)) { 95 // source = DragAndDropManager.importString("@i: " + imagePath.getFileName() + size, location, attachToFreeItems); 96 // } else { 97 // source = DragAndDropManager.importString("@i: " + fullPath + size, location, attachToFreeItems); 98 // } 94 99 source.setThickness(thickness); 95 100 source.setBorderColor(borderColor);
Note:
See TracChangeset
for help on using the changeset viewer.