diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-21 01:52:15 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-02-21 01:52:15 +0000 |
commit | 2c124b658762e5498a42fb1453304ba32a9eca6b (patch) | |
tree | 070b1d86a1b045247a574054db49e461a1cc3c91 | |
parent | 9ac5fdfefb56ed42fd6b0b3ec90e5ab87c7a0595 (diff) |
some cut-n-paste debugging stuff (more likely to follow)
git-svn-id: svn://localhost/ardour2/branches/3.0@8914 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/debug.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/debug.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gtk2_ardour/debug.cc b/gtk2_ardour/debug.cc index 1d437ffe21..9dac857125 100644 --- a/gtk2_ardour/debug.cc +++ b/gtk2_ardour/debug.cc @@ -26,4 +26,5 @@ using namespace std; uint64_t PBD::DEBUG::Drags = PBD::new_debug_bit ("drags"); +uint64_t PBD::DEBUG::CutNPaste = PBD::new_debug_bit ("cutnpaste"); diff --git a/gtk2_ardour/debug.h b/gtk2_ardour/debug.h index 830f17ab30..488cbd202c 100644 --- a/gtk2_ardour/debug.h +++ b/gtk2_ardour/debug.h @@ -27,6 +27,7 @@ namespace PBD { namespace DEBUG { extern uint64_t Drags; + extern uint64_t CutNPaste; } } diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 1e6ded20ae..10d869945a 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -49,6 +49,7 @@ #include "canvas-hit.h" #include "canvas-note.h" #include "canvas_patch_change.h" +#include "debug.h" #include "editor.h" #include "ghostregion.h" #include "gui_thread.h" @@ -2969,6 +2970,8 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb) return; } + DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("MIDI paste @ %1 times %2\n", pos, times)); + start_note_diff_command (_("paste")); Evoral::MusicalTime beat_delta; @@ -2981,6 +2984,12 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb) beat_delta = (*mcb.notes().begin())->time() - paste_pos_beats; paste_pos_beats = 0; + DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("Paste data spans from %1 to %2 (%3) ; paste pos beats = %4 (based on %5 - %6 ; beat delta = %7\n", + (*mcb.notes().begin())->time(), + (*mcb.notes().rbegin())->end_time(), + duration, pos, _region->position(), + paste_pos_beats, beat_delta)); + clear_selection (); for (int n = 0; n < (int) times; ++n) { @@ -3006,6 +3015,8 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb) if (end_frame > region_end) { + DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("Paste extended region from %1 to %2\n", region_end, end_frame)); + trackview.session()->begin_reversible_command (_("paste")); _region->clear_changes (); |