Commit 4c0b25a2 authored by Clint Rogers's avatar Clint Rogers

Closes #2364; saves the cursor position before trashing, and restores it after.

parent cbddb51f
......@@ -992,10 +992,16 @@ public abstract class MediaPage : CheckerboardPage {
}
protected virtual void on_move_to_trash() {
CheckerboardItem? 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));
}
if ((restore_point != null) && (get_view().contains(restore_point))) {
set_cursor(restore_point);
}
}
protected virtual void on_edit_title() {
......
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