diff options
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/muse/liste/listedit.cpp | 14 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 22 | ||||
-rw-r--r-- | muse2/muse/undo.cpp | 1 |
3 files changed, 17 insertions, 20 deletions
diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp index 080ee01c..5f73a3ba 100644 --- a/muse2/muse/liste/listedit.cpp +++ b/muse2/muse/liste/listedit.cpp @@ -852,7 +852,7 @@ void ListEdit::cmd(int cmd) bool found = false; for (int row = 0; row < liste->topLevelItemCount(); ++row) { - QTreeWidgetItem* i = liste->topLevelItem(row); + QTreeWidgetItem* i = liste->topLevelItem(row); EventListItem *item = (EventListItem *) i; if (i->isSelected() || item->event.selected()) { @@ -862,7 +862,8 @@ void ListEdit::cmd(int cmd) } if(!found) break; - song->startUndo(); + + Undo operations; EventListItem *deletedEvent=NULL; for (int row = 0; row < liste->topLevelItemCount(); ++row) { @@ -871,8 +872,8 @@ void ListEdit::cmd(int cmd) if (i->isSelected() || item->event.selected()) { deletedEvent=item; - // Indicate no undo, and do port controller values and clone parts. - audio->msgDeleteEvent(item->event, item->part, false, true, true); + // Port controller values and clone parts. + operations.push_back(UndoOp(UndoOp::DeleteEvent,item->event, item->part, true, true)); } } @@ -895,9 +896,8 @@ void ListEdit::cmd(int cmd) } } selectedTick=nextTick; - song->endUndo(SC_EVENT_MODIFIED); - //printf("selected tick = %d\n", selectedTick); - //emit selectionChanged(); + + song->applyOperationGroup(operations); break; } } diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index ca88d36a..309342ae 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -4443,7 +4443,7 @@ void staff_t::update_part_indices() -//hint: recalculating event- and itemlists "from zero" +//note: recalculating event- and itemlists "from zero" // could happen in realtime, as it is pretty fast. // however, this adds unneccessary cpu usage. // it is NO problem to recalc the stuff "from zero" @@ -4456,25 +4456,21 @@ void staff_t::update_part_indices() * between, for example, when a cis is tied to a des * * CURRENT TODO - * o speed up list editor - * o insert empty measure should also work inside parts - * o canvas editor: create clone via "alt+drag" moves window instead - * - * o rename stuff: UndoOp -> Operation, Undo -> OpList, - * UndoType -> OpType, iUndoOp, riUndoOp -> iOperation, - * undo.cpp/.h -> operations.cpp/.h + * o remove functions for disabling key/sigmap * o either remove these "hidden notes", or deal with them in the score editor + * o insert empty measure should also work inside parts, that is, + * move notes _within_ parts + * + * IMPORTANT TODO + * o canvas editor: create clone via "alt+drag" moves window instead * o investigate with valgrind * o controller view in score editor * o deal with expanding parts * o fix sigedit boxes - * o remove functions for disabling key/sigmap - * o mastertrack editor: key-combobox is buggy - * o drum editor: channel-stuff - * - * IMPORTANT TODO * o solo button * o grand staff brace + * o mastertrack editor: key-combobox is buggy + * o drum editor: channel-stuff * o do partial recalculating; recalculating can take pretty long * (0,5 sec) when displaying a whole song in scores * o transpose etc. must also transpose key-pressure events diff --git a/muse2/muse/undo.cpp b/muse2/muse/undo.cpp index c5b211b2..0c05ef08 100644 --- a/muse2/muse/undo.cpp +++ b/muse2/muse/undo.cpp @@ -77,6 +77,7 @@ void UndoOp::dump() case ModifyMarker: case AddKey: case DeleteKey: + case DoNothing: break; } } |