Ignore:
Timestamp:
11/12/19 14:37:28 (5 years ago)
Author:
bnemhaus
Message:

When dnd'ing a or copy/pasting a image that is external to expeditee (not a sub file of expedite.home) then that image is imported into the expeditee file system with a randomly generated name. A users FolderSettings are used to determine location to import image too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/management/ResourceUtil.java

    r1446 r1447  
    2626         * Attempts to relativise a image path using expeditee.home (FrameIO.PARENT_FOLDER).
    2727         * @param path The path to attempt to relativise
    28          * @return Returns the most relativised path if one exists, otherwise returns a copy of the ref parameter passed in.
     28         * @return Returns the most relativised path if one exists, otherwise returns the ref parameter passed in.
    2929         */
    3030        public static Path relativiseImagePath(Path path) {
     
    4949               
    5050                return null;
     51        }
     52       
     53        public static Path getImageSaveFileLocation(Frame context) {
     54                List<String> directories = ResourceManager.images.getDirectories(context);
     55                if (directories.isEmpty()) {
     56                        return Paths.get(FrameIO.PARENT_FOLDER).toAbsolutePath();
     57                } else {
     58                        return Paths.get(directories.get(0));
     59                }
    5160        }
    5261       
Note: See TracChangeset for help on using the changeset viewer.