[shotwell] Update cursor state after full-window mode: bug #729562, bug #719169
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Update cursor state after full-window mode: bug #729562, bug #719169
- Date: Tue, 6 May 2014 18:52:39 +0000 (UTC)
commit 6d93554176ee59f4f5f473eacd5adbd8f1eb8c7c
Author: Daniel Landau <daniel landau iki fi>
Date: Tue May 6 11:50:21 2014 -0700
Update cursor state after full-window mode: bug #729562, bug #719169
If the user double-clicks on a photo and moves through the collection
and/or removes photos from the collection, the cursor state in the
original page becomes bogus and leads to strange results when
navigating the cursor with the keyboard. This patch re-updates the
cursor state when returning to the page.
THANKS | 1 +
src/MediaPage.vala | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/THANKS b/THANKS
index 873a1d3..f779c1f 100644
--- a/THANKS
+++ b/THANKS
@@ -39,6 +39,7 @@ Till Kamppeter <till kamppeter gmail com>
Richard B. Kreckel <kreckel ginac de>
Andreas Kühntopf <andreas kuehntopf org>
Damien Lallement <mageia damsweb net>
+Daniel Landau <daniel landau iki fi>
Dominique Leuenberger <dimstar opensuse org>
Dominic Lloyd <dwlloyd telus net>
Tobias Lott <tobias lott eu org>
diff --git a/src/MediaPage.vala b/src/MediaPage.vala
index 4d7ee2a..9f98466 100644
--- a/src/MediaPage.vala
+++ b/src/MediaPage.vala
@@ -818,6 +818,14 @@ public abstract class MediaPage : CheckerboardPage {
set_display_tags(Config.Facade.get_instance().get_display_photo_tags());
get_view().thaw_notifications();
+ // Update cursor position to match the selection that potentially moved while the user
+ // navigated in SinglePhotoPage
+ if (get_view().get_selected_count() > 0) {
+ CheckerboardItem? selected = (CheckerboardItem?) get_view().get_selected_at(0);
+ if (selected != null)
+ cursor_to_item(selected);
+ }
+
sync_sort();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]