Skip to content

Commit 4610ca2

Browse files
author
zaxxon@ca.astound.net
committed
Fixes to slideshow in both lines. Preview1 version now handles special characters % & #
1 parent ab440a1 commit 4610ca2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • widgets/SlideShow/src/org/widgetfx/widget/slideshow

‎widgets/SlideShow/src/org/widgetfx/widget/slideshow/SlideShow.fx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ private function updateImage():Void {
9999
}
100100
worker = JavaFXWorker {
101101
inBackground: function() {
102+
102103
var image = Image {url: currentFile, height: imageHeight};
103104
if (image.size == 0) {
104105
throw new RuntimeException("Image has empty size: {currentFile}");
@@ -182,7 +183,10 @@ private function getImageFiles(directory:File):String[] {
182183
getImageFiles(file);
183184
} else if (extension != null and ImageIO.getImageReadersBySuffix(extension).hasNext()) {
184185
fileCount++;
185-
file.toURL().toString();
186+
var url = file.toURL();
187+
var uri = new java.net.URI(url.getProtocol(), url.getUserInfo(),
188+
url.getHost(), url.getPort(), url.getPath(), url.getQuery(), url.getRef());
189+
uri.toString().replaceAll("#", "%23");
186190
} else {
187191
emptyFile;
188192
}

0 commit comments

Comments
 (0)