diff --git a/WPicView/MainWindow.xaml.cs b/WPicView/MainWindow.xaml.cs index d4c84b9..86959c0 100644 --- a/WPicView/MainWindow.xaml.cs +++ b/WPicView/MainWindow.xaml.cs @@ -73,6 +73,14 @@ namespace WPicView if (e.Key == System.Windows.Input.Key.Right) { if (fPos < allFiles.Length -1 ) { fPos += 1; + } else + { + // look if more files popped up in the meantime... + allFiles = System.IO.Directory.GetFiles(allDirs[dPos], searchPattern); + if (fPos < allFiles.Length - 1) + { + fPos += 1; + } } } else if (e.Key == System.Windows.Input.Key.Left) { @@ -83,6 +91,7 @@ namespace WPicView if (e.Key == Key.End) { + allFiles = System.IO.Directory.GetFiles(allDirs[dPos], searchPattern); fPos = allFiles.Length - 1; } if (e.Key == Key.Home )