[shotwell/shotwell-0.24] viewer: Don't always add photo again after saving



commit ac68d00c370859ea2a423348d3210b6de8c4adfe
Author: Jens Georg <mail jensge org>
Date:   Sat Mar 4 00:05:43 2017 +0100

    viewer: Don't always add photo again after saving
    
    This seems to cause the photo being in the collection twice, causing
    not being able to navigate to the previous photo anymore
    
    Just do it when the photo we save isn't the current photo.
    
    Signed-off-by: Jens Georg <mail jensge org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734816

 src/direct/DirectPhotoPage.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/direct/DirectPhotoPage.vala b/src/direct/DirectPhotoPage.vala
index 3d23528..27d1a8a 100644
--- a/src/direct/DirectPhotoPage.vala
+++ b/src/direct/DirectPhotoPage.vala
@@ -476,8 +476,10 @@ public class DirectPhotoPage : EditingHostPage {
         DirectPhoto photo;
         DirectPhoto.global.fetch(dest, out photo, true);
 
-        DirectView tmp_view = new DirectView(photo);
-        view_controller.add(tmp_view);
+        if (!get_photo().equals(photo)) {
+            DirectView tmp_view = new DirectView(photo);
+            view_controller.add(tmp_view);
+        }
 
         DirectPhoto.global.reimport_photo(photo);
         display_mirror_of(view_controller, photo);


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