[bijiben] NoteObj set rgba : only save note if new color



commit 156e6e9e0f71fcc4805cdc626c376df35a90d31a
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Mon Dec 3 23:57:10 2012 +0100

    NoteObj set rgba : only save note if new color

 src/libbiji/biji-note-obj.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libbiji/biji-note-obj.c b/src/libbiji/biji-note-obj.c
index 0fc26ed..534c71a 100644
--- a/src/libbiji/biji-note-obj.c
+++ b/src/libbiji/biji-note-obj.c
@@ -485,9 +485,6 @@ biji_note_obj_set_rgba_internal (BijiNoteObj *n, GdkRGBA *rgba)
   n->priv->color = gdk_rgba_copy(rgba);
   n->priv->icon_needs_update = TRUE;
 
-  biji_note_id_set_last_metadata_change_date_now (n->priv->id);
-  biji_note_obj_save_note (n);
-
   /* Make editor & notebook know about this change */
   g_signal_emit (G_OBJECT (n), biji_obj_signals[NOTE_COLOR_CHANGED],0);
   g_signal_emit (G_OBJECT (n), biji_obj_signals[NOTE_CHANGED],0);
@@ -508,6 +505,9 @@ biji_note_obj_set_rgba(BijiNoteObj *n,GdkRGBA *rgba)
   {
     gdk_rgba_free (n->priv->color);
     biji_note_obj_set_rgba_internal (n, rgba);
+
+    biji_note_id_set_last_metadata_change_date_now (n->priv->id);
+    biji_note_obj_save_note (n);
   }
 }
 



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