[shotwell] Don't crash after deleting photo in full-window mode: Bug #732964



commit 3c8ac3788b488d43e37dfea3b959834ceeae232f
Author: Mike Gorse <mgorse suse com>
Date:   Thu Jul 24 14:01:45 2014 -0700

    Don't crash after deleting photo in full-window mode: Bug #732964

 THANKS             |    1 +
 src/PhotoPage.vala |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/THANKS b/THANKS
index f779c1f..c731700 100644
--- a/THANKS
+++ b/THANKS
@@ -27,6 +27,7 @@ Tobe Deprez <tobedeprez gmx com>
 Guillaume Desmottes <gdesmott gnome org>
 Fryderyk Dziarmagowski <fdziarmagowski gmail com>
 Josh Freeman <josh twilightedge com>
+Mike Gorse <mgorse suse com>
 guillaumev <guillaume viguierjust com>
 Chris Hemsing <c hemsing gmx net>
 Petr Heynch <petr heynch gmail com>
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala
index 50f0c1a..4a08adc 100644
--- a/src/PhotoPage.vala
+++ b/src/PhotoPage.vala
@@ -1358,7 +1358,7 @@ public abstract class EditingHostPage : SinglePhotoPage {
     
     protected override bool on_shift_pressed(Gdk.EventKey? event) {
         // show quick compare of original only if no tool is in use, the original pixbuf is handy
-        if (current_tool == null && !get_ctrl_pressed() && !get_alt_pressed())
+        if (current_tool == null && !get_ctrl_pressed() && !get_alt_pressed() && has_photo())
             swap_in_original();
         
         return base.on_shift_pressed(event);
@@ -3144,6 +3144,9 @@ public class LibraryPhotoPage : EditingHostPage {
         
         // move on to the next one in the collection
         on_next_photo();
+        
+        ViewCollection view = get_view();
+        view.remove_marked(view.mark(view.get_view_for_source(photo)));
         if (photo.equals(get_photo())) {
             // this indicates there is only one photo in the controller, or now zero, so switch 
             // to the Photos page, which is guaranteed to be there


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