Closed twest820 closed 8 years ago
If I understand this issue correctly, ... The following is the behaviour we want:
CustomFilter should only ever let a person apply the filter only if at least one file matches the query.
This is the behavior coded into the current release: if 0 files match the query, the Okay button is disabled. Thus it should never get into a situation where there is an empty image set being displayed.
Further investigation reveals a different kind of behaviour related to empty matches that we may want to do something about. -Apply a custom filter with at least one match (e.g., Sheep > 0, where only one image match). -Modify those matches so that no images now match (e.g., set Sheep = 0 for that image) -Try to reapply the custom filter. Because no images now match, its OK button is disabled, which means that the filter state is unchanged (i.e., that no longer matching image remains displayed).
Possible solutions: Put in logic in the custom filter, where:
Proper explanation of empty selection implemented.
When datetimes are adjusted under a custom filter it's possible no images are selected after the adjustments are made. An unhandled exception in TimelapseWindow.ShowImages() results. I'm fixing the logic defect---for some reason ShowImages() tries to figure out if any images are selected by looking at ImageCache.CurrentRow instead of the number of selected images---which avoids the crash but results in Constants.Images.EmptyImageSet being displayed. This is confusing as the user's presented with a display incorrectly stating there are no images in the image set. So some additional fixing is appropriate, both on this path and on similar cases such as
Some possible options are