quickviewer icon indicating copy to clipboard operation
quickviewer copied to clipboard

Deleted images continue to show in QuickViewer

Open ErikLacharite opened this issue 5 years ago • 3 comments

My expected behaviour is that the deleted image would be removed from the list view, and the slide-show view (and the slide count to be decremented by -1).

ErikLacharite avatar Jul 21 '20 03:07 ErikLacharite

Basically, QuickViewer doesn't anticipate events where images are added to or deleted from a folder after the folder's images are displayed. The only time changes are reflected is when QuickViwer itself deletes or moves an image to the trash.

Some people may think this behavior is a bug. However, to improve this behavior, we need to monitor file changes in folders. This may not be feasible due to the incompatibility of different OSes.

kanryu avatar Jul 21 '20 05:07 kanryu

I am seeing this issue when deleting images from the QuickViewer UI (Windows 10).

But related to you comment, if you are thinking of adding a file/folder monitor to the OS, see: https://doc.qt.io/qt-5/qfilesystemwatcher.html#directoryChanged

ErikLacharite avatar Jul 27 '20 22:07 ErikLacharite

If QuickViewer deletes the image itself or moves it to the trash, the problem you pointed out will not occur. As long as the program is working properly.

To see:

  • https://github.com/kanryu/quickviewer/blob/master/QuickViewer/src/mainwindow.cpp
  • MainWindow::onActionRecyclePage_triggered()
  • MainWindow::onActionDeletePage_triggered()

kanryu avatar Jul 28 '20 01:07 kanryu