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
This commit is contained in:
parent
9ac5fdfefb
commit
2c124b6587
|
@ -26,4 +26,5 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
uint64_t PBD::DEBUG::Drags = PBD::new_debug_bit ("drags");
|
uint64_t PBD::DEBUG::Drags = PBD::new_debug_bit ("drags");
|
||||||
|
uint64_t PBD::DEBUG::CutNPaste = PBD::new_debug_bit ("cutnpaste");
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
namespace PBD {
|
namespace PBD {
|
||||||
namespace DEBUG {
|
namespace DEBUG {
|
||||||
extern uint64_t Drags;
|
extern uint64_t Drags;
|
||||||
|
extern uint64_t CutNPaste;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#include "canvas-hit.h"
|
#include "canvas-hit.h"
|
||||||
#include "canvas-note.h"
|
#include "canvas-note.h"
|
||||||
#include "canvas_patch_change.h"
|
#include "canvas_patch_change.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "ghostregion.h"
|
#include "ghostregion.h"
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
|
@ -2969,6 +2970,8 @@ MidiRegionView::paste (framepos_t pos, float times, const MidiCutBuffer& mcb)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("MIDI paste @ %1 times %2\n", pos, times));
|
||||||
|
|
||||||
start_note_diff_command (_("paste"));
|
start_note_diff_command (_("paste"));
|
||||||
|
|
||||||
Evoral::MusicalTime beat_delta;
|
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;
|
beat_delta = (*mcb.notes().begin())->time() - paste_pos_beats;
|
||||||
paste_pos_beats = 0;
|
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 ();
|
clear_selection ();
|
||||||
|
|
||||||
for (int n = 0; n < (int) times; ++n) {
|
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) {
|
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"));
|
trackview.session()->begin_reversible_command (_("paste"));
|
||||||
|
|
||||||
_region->clear_changes ();
|
_region->clear_changes ();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user