denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] copying the chord directives


From: Richard Shann
Subject: [Denemo-devel] copying the chord directives
Date: Fri, 17 Jul 2009 10:10:38 +0100

Jeremiah,
I think you have introduced some bad code

<       thechord->directives = g_list_copy(g);

if you are just adding and deleting notes there is no need to do
anything about the directives attached to the chord, they won't be
touched.
It is those attached to the note you might want to preserve. But even in
this case don't copy them, just detach them and re-connect to the new
note. 
note->directives = NULL
detaches a list from note (so that it doesn't get deleted when the note
gets deleted) and then you can re-attach it to the new note

newnote->directives = the value of note->directives before you detached
it.

Is it clear - I sketched it in the earlier mail? 

Richard






reply via email to

[Prev in Thread] Current Thread [Next in Thread]