Commit 6536e0c9 authored by Clint Rogers's avatar Clint Rogers

Don't attempt to restore the cursor if there are 0 thumbnails in the current...

Don't attempt to restore the cursor if there are 0 thumbnails in the current checkerboard; closes #5919.
parent c438499b
......@@ -986,10 +986,14 @@ public abstract class MediaPage : CheckerboardPage {
private void on_remove_from_library() {
remove_photos_from_library((Gee.Collection<LibraryPhoto>) get_view().get_selected_sources());
}
protected virtual void on_move_to_trash() {
CheckerboardItem? restore_point = get_view().get_next(cursor) as CheckerboardItem;
CheckerboardItem? restore_point = null;
if (cursor != null) {
restore_point = get_view().get_next(cursor) as CheckerboardItem;
}
if (get_view().get_selected_count() > 0) {
get_command_manager().execute(new TrashUntrashPhotosCommand(
(Gee.Collection<MediaSource>) get_view().get_selected_sources(), true));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment