[gnome-photos/wip/rishi/edit-mode: 4/26] embed: Don't reset the PreviewView when returning from edit mode
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/edit-mode: 4/26] embed: Don't reset the PreviewView when returning from edit mode
- Date: Thu, 27 Aug 2015 09:38:00 +0000 (UTC)
commit fc4ba15a61312d78b041cf9721b9171dfb13207d
Author: Debarshi Ray <debarshir gnome org>
Date: Thu May 7 08:36:50 2015 +0200
embed: Don't reset the PreviewView when returning from edit mode
src/photos-embed.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index b93a5d8..c0e607d 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -201,7 +201,7 @@ photos_embed_activate_result (PhotosEmbed *self)
static void
-photos_embed_prepare_for_preview (PhotosEmbed *self)
+photos_embed_prepare_for_preview (PhotosEmbed *self, gboolean reset)
{
PhotosEmbedPrivate *priv = self->priv;
@@ -209,8 +209,10 @@ photos_embed_prepare_for_preview (PhotosEmbed *self)
* ErrorHandler
*/
+ if (reset)
+ photos_preview_view_set_node (PHOTOS_PREVIEW_VIEW (priv->preview), NULL);
+
photos_spinner_box_stop (PHOTOS_SPINNER_BOX (priv->spinner_box));
- photos_preview_view_set_node (PHOTOS_PREVIEW_VIEW (priv->preview), NULL);
gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), "preview");
}
@@ -539,7 +541,7 @@ photos_embed_window_mode_changed (PhotosModeController *mode_cntrlr,
goto set_toolbar_model;
case PHOTOS_WINDOW_MODE_PREVIEW:
- photos_embed_prepare_for_preview (self);
+ photos_embed_prepare_for_preview (self, old_mode != PHOTOS_WINDOW_MODE_EDIT);
break;
case PHOTOS_WINDOW_MODE_SEARCH:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]