Diff of /trunk/src/undo.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 241 by harbaum, Thu Jul 23 18:50:17 2009 UTC revision 242 by harbaum, Fri Jul 24 09:48:42 2009 UTC
# Line 154  static void undo_object_copy_base(object Line 154  static void undo_object_copy_base(object
154    OBJECT_VERSION(*dst) = OBJECT_VERSION(*src);    OBJECT_VERSION(*dst) = OBJECT_VERSION(*src);
155    OBJECT_TIME(*dst)    = OBJECT_TIME(*src);    OBJECT_TIME(*dst)    = OBJECT_TIME(*src);
156    OBJECT_USER(*dst)    = OBJECT_USER(*src);    OBJECT_USER(*dst)    = OBJECT_USER(*src);
   OBJECT_TAG(*dst)     = OBJECT_TAG(*src);  
157    OBJECT_FLAGS(*dst)   = OBJECT_FLAGS(*src);    OBJECT_FLAGS(*dst)   = OBJECT_FLAGS(*src);
158    OBJECT_VISIBLE(*dst) = OBJECT_VISIBLE(*src);    OBJECT_VISIBLE(*dst) = OBJECT_VISIBLE(*src);
159      OBJECT_TAG(*dst)     = osm_tags_copy(OBJECT_TAG(*src));
160  }  }
161    
162  /* create a local copy of the entire object */  /* create a local copy of the entire object */
# Line 223  static object_t *undo_object_save(osm_t Line 223  static object_t *undo_object_save(osm_t
223      while(member) {      while(member) {
224        *id_chain = g_new0(item_id_chain_t, 1);        *id_chain = g_new0(item_id_chain_t, 1);
225        (*id_chain)->type = member->object.type;        (*id_chain)->type = member->object.type;
226        (*id_chain)->id = OBJECT_ID(member->object);        (*id_chain)->id = osm_object_get_id(&member->object);
227    
228        id_chain = &(*id_chain)->next;        id_chain = &(*id_chain)->next;
229        member = member->next;        member = member->next;
# Line 249  void undo_append_object(appdata_t *appda Line 249  void undo_append_object(appdata_t *appda
249    
250    g_assert(appdata->undo.open);    g_assert(appdata->undo.open);
251    
   
252    /* deleting an object will affect all relations it's part of */    /* deleting an object will affect all relations it's part of */
253    /* therefore handle them first and save their state to undo  */    /* therefore handle them first and save their state to undo  */
254    /* the modifications */    /* the modifications */
# Line 271  void undo_append_object(appdata_t *appda Line 270  void undo_append_object(appdata_t *appda
270      }      }
271    }    }
272    
   
273    /* a simple stand-alone node deletion is just a single */    /* a simple stand-alone node deletion is just a single */
274    /* operation on the database/map so only one undo_op is saved */    /* operation on the database/map so only one undo_op is saved */
275    

Legend:
Removed from v.241  
changed lines
  Added in v.242