--- ../../denemo-cvsUPDATE/denemo/src/pitchentry.c 2007-09-23 17:20:02.000000000 +0100 +++ pitchentry.c 2007-09-25 16:22:56.000000000 +0100 @@ -405,12 +405,8 @@ #define store (((DenemoStaff*)gui->si->currentstaff->data)->tone_store) /* if this measure has tones, but not on the currentobject then clear the tones, otherwise the one being stored will not apply to the currentobject */ - -#if 1 if(gui->si->currentobject && !((chord*)((DenemoObject *)gui->si->currentobject->data)->object)->tone_node && store && g_list_nth(store,gui->si->currentmeasurenum - 1) && g_list_nth(store,gui->si->currentmeasurenum - 1)->data) clear_tones_currentmeasure(NULL, gui); -#endif - store = put_tone(store, gui->si->currentmeasurenum - 1, thetone); nextmeasure = apply_tones(gui->si); displayhelper (gui); @@ -494,7 +490,22 @@ if(tone_node) { ((tone*)tone_node->data)->valid = FALSE; thechord->tone_node = NULL; + /* move cursor back to where tone overlay starts, so that the overlay is placed on the same notes as before */ + gint leftshifts = 0; + while(si->currentobject->prev) { + cursorleft(PR_gui); + leftshifts++; + DenemoObject *theobj = (DenemoObject *)si->currentobject->data; + if((theobj->type == CHORD) && (((chord*)theobj->object)->notes!=NULL) && (((chord*)theobj->object)->tone_node == NULL)) { + cursorright(PR_gui); + leftshifts--; + break; + } + } apply_tones(si); + /*restore the position of the cursor before the delete of the tone */ + while(leftshifts--) + cursorright(PR_gui); displayhelper (PR_gui); return TRUE; } else {