[shotwell] Save selection before setting the restore point



commit d5aa2a2df84a807843e684075bec711ee1df8ad4
Author: Jens Georg <mail jensge org>
Date:   Mon Feb 26 18:16:40 2018 +0100

    Save selection before setting the restore point
    
    With the fix for bug 786531, setting the restore point before executing
    the job would add the restore point to the list of selected items.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793818

 src/MediaPage.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/MediaPage.vala b/src/MediaPage.vala
index fb95b21..eeb79e6 100644
--- a/src/MediaPage.vala
+++ b/src/MediaPage.vala
@@ -775,13 +775,15 @@ public abstract class MediaPage : CheckerboardPage {
             restore_point = get_view().get_next(cursor) as CheckerboardItem;
         }
 
+        var sources = get_view().get_selected_sources();
+
         if ((restore_point != null) && (get_view().contains(restore_point))) {
             set_cursor(restore_point);
         }
 
         if (get_view().get_selected_count() > 0) {
             get_command_manager().execute(new TrashUntrashPhotosCommand(
-                (Gee.Collection<MediaSource>) get_view().get_selected_sources(), true));
+                (Gee.Collection<MediaSource>) sources, true));
         }
 
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]