no more trim cursor in drae mode in the pianoroll
For some reason, we allow users to trim notes on the timeline when in draw mode. Not sure why. We don't allow this in pianorolls, so make sure the cursors don't suggest otherwise
This commit is contained in:
@@ -3339,3 +3339,8 @@ EditingContext::set_loop_range (timepos_t const & start, timepos_t const & end,
|
||||
commit_reversible_command ();
|
||||
}
|
||||
|
||||
bool
|
||||
EditingContext::allow_trim_cursors () const
|
||||
{
|
||||
return mouse_mode == MouseContent || mouse_mode == MouseTimeFX || mouse_mode == MouseDraw;
|
||||
}
|
||||
|
||||
@@ -479,6 +479,8 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
||||
|
||||
void set_loop_range (Temporal::timepos_t const & start, Temporal::timepos_t const & end, std::string cmd);
|
||||
|
||||
virtual bool allow_trim_cursors () const;
|
||||
|
||||
protected:
|
||||
std::string _name;
|
||||
bool within_track_canvas;
|
||||
|
||||
@@ -3977,7 +3977,7 @@ void
|
||||
MidiView::note_mouse_position (float x_fraction, float /*y_fraction*/, bool can_set_cursor)
|
||||
{
|
||||
Editing::MouseMode mm = _editing_context.current_mouse_mode();
|
||||
bool trimmable = (mm == MouseContent || mm == MouseTimeFX || mm == MouseDraw);
|
||||
bool trimmable = _editing_context.allow_trim_cursors ();
|
||||
|
||||
if (can_set_cursor) {
|
||||
if (trimmable && x_fraction > 0.0 && x_fraction < 0.2) {
|
||||
|
||||
@@ -2776,3 +2776,9 @@ Pianoroll::map_transport_state ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Pianoroll::allow_trim_cursors () const
|
||||
{
|
||||
return mouse_mode == Editing::MouseContent || mouse_mode == Editing::MouseTimeFX;
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ class Pianoroll : public CueEditor
|
||||
|
||||
PianorollMidiView* midi_view() const { return view; }
|
||||
void set_session (ARDOUR::Session*);
|
||||
bool allow_trim_cursors () const;
|
||||
|
||||
protected:
|
||||
void load_bindings ();
|
||||
|
||||
Reference in New Issue
Block a user