fix one of 3 editing context refactoring warnings
This commit is contained in:
@@ -759,3 +759,21 @@ MidiRegionView::trim_front_ending ()
|
||||
midi_region()->fix_negative_start (_editing_context.history());
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MidiRegionView::post_paste (Temporal::timepos_t const & pos, const ::Selection& selection, PasteContext& ctx)
|
||||
{
|
||||
// Paste control points to automation children, if available
|
||||
|
||||
typedef RouteTimeAxisView::AutomationTracks ATracks;
|
||||
ATracks const & atracks = dynamic_cast<StripableTimeAxisView*>(&trackview)->automation_tracks();
|
||||
bool commit = false;
|
||||
|
||||
for (auto & at : atracks) {
|
||||
if (at.second->paste(pos, selection, ctx)) {
|
||||
commit = true;
|
||||
}
|
||||
}
|
||||
|
||||
return commit;
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ public:
|
||||
void region_resized (const PBD::PropertyChange&);
|
||||
bool canvas_group_event (GdkEvent*);
|
||||
void add_control_points_to_selection (Temporal::timepos_t const &, Temporal::timepos_t const &, double y0, double y1);
|
||||
bool post_paste (Temporal::timepos_t const & pos, const ::Selection& selection, PasteContext& ctx);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -4167,16 +4167,7 @@ MidiView::paste (timepos_t const & pos, const ::Selection& selection, PasteConte
|
||||
paste_internal (pos, ctx.count, ctx.times, **m);
|
||||
}
|
||||
|
||||
#warning paul fix MRV/MV
|
||||
#if 0
|
||||
// Paste control points to automation children, if available
|
||||
for (auto & at : midi_view()->automation_tracks()) {
|
||||
if (at.second->paste(pos, selection, ctx)) {
|
||||
commit = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return commit;
|
||||
return post_paste (pos, selection, ctx) || commit;
|
||||
}
|
||||
|
||||
/** undo commands were initiated at the 'action' level. ::paste and ::paste_internal should implement subcommands */
|
||||
|
||||
@@ -695,6 +695,7 @@ class MidiView : public virtual sigc::trackable, public LineMerger
|
||||
virtual void add_control_points_to_selection (Temporal::timepos_t const &, Temporal::timepos_t const &, double y0, double y1) {}
|
||||
|
||||
void color_note (NoteBase*, int channel);
|
||||
virtual bool post_paste (Temporal::timepos_t const & pos, const ::Selection& selection, PasteContext& ctx) { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user