only show scroomer note names in draw/internal edit modes (if at all)
This commit is contained in:
parent
2fa6500ec5
commit
5644c8587e
|
@ -428,6 +428,11 @@ Editor::mouse_mode_toggled (MouseMode m)
|
||||||
update_all_enter_cursors ();
|
update_all_enter_cursors ();
|
||||||
|
|
||||||
MouseModeChanged (); /* EMIT SIGNAL */
|
MouseModeChanged (); /* EMIT SIGNAL */
|
||||||
|
|
||||||
|
if ((was_internal && !internal_editing()) ||
|
||||||
|
(!was_internal && internal_editing())) {
|
||||||
|
queue_redisplay_track_views ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -141,8 +141,15 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanva
|
||||||
_midnam_channel_selector.disable_scrolling();
|
_midnam_channel_selector.disable_scrolling();
|
||||||
|
|
||||||
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &MidiTimeAxisView::parameter_changed));
|
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &MidiTimeAxisView::parameter_changed));
|
||||||
|
|
||||||
|
_editor.MouseModeChanged.connect_same_thread (mouse_mode_connection, sigc::mem_fun (*this, &MidiTimeAxisView::mouse_mode_changed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MidiTimeAxisView::mouse_mode_changed ()
|
||||||
|
{
|
||||||
|
_piano_roll_header->queue_resize ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiTimeAxisView::parameter_changed (string const & param)
|
MidiTimeAxisView::parameter_changed (string const & param)
|
||||||
|
|
|
@ -208,6 +208,8 @@ private:
|
||||||
void create_velocity_automation_child (Evoral::Parameter const &, bool show);
|
void create_velocity_automation_child (Evoral::Parameter const &, bool show);
|
||||||
|
|
||||||
void update_patch_selector ();
|
void update_patch_selector ();
|
||||||
|
void mouse_mode_changed ();
|
||||||
|
PBD::ScopedConnection mouse_mode_connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_midi_time_axis_h__ */
|
#endif /* __ardour_midi_time_axis_h__ */
|
||||||
|
|
|
@ -291,9 +291,7 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev)
|
||||||
cr->rectangle (0,0,_scroomer_size, get_height () );
|
cr->rectangle (0,0,_scroomer_size, get_height () );
|
||||||
cr->clip();
|
cr->clip();
|
||||||
|
|
||||||
Editing::NoteNameDisplay nnd = UIConfiguration::instance().get_note_name_display();
|
if (show_scroomer()) {
|
||||||
|
|
||||||
if ((nnd == Editing::Always) || ((nnd == Editing::WithMIDNAM) && have_note_names)) {
|
|
||||||
|
|
||||||
/* Draw the actual text */
|
/* Draw the actual text */
|
||||||
|
|
||||||
|
@ -802,12 +800,33 @@ PianoRollHeader::invalidate_note_range (int lowest, int highest)
|
||||||
queue_draw ();
|
queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
PianoRollHeader::on_size_request (Gtk::Requisition* r)
|
PianoRollHeader::show_scroomer () const
|
||||||
{
|
{
|
||||||
Editing::NoteNameDisplay nnd = UIConfiguration::instance().get_note_name_display();
|
Editing::NoteNameDisplay nnd = UIConfiguration::instance().get_note_name_display();
|
||||||
|
|
||||||
if ((nnd == Editing::Always) || ((nnd == Editing::WithMIDNAM) && have_note_names)) {
|
if (nnd == Editing::Never) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (editor().current_mouse_mode()) {
|
||||||
|
case Editing::MouseDraw:
|
||||||
|
case Editing::MouseContent:
|
||||||
|
if (nnd == Editing::WithMIDNAM) {
|
||||||
|
return have_note_names;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PianoRollHeader::on_size_request (Gtk::Requisition* r)
|
||||||
|
{
|
||||||
|
if (show_scroomer()) {
|
||||||
_scroomer_size = 60.f;
|
_scroomer_size = 60.f;
|
||||||
} else {
|
} else {
|
||||||
_scroomer_size = 20.f;
|
_scroomer_size = 20.f;
|
||||||
|
|
|
@ -144,6 +144,7 @@ private:
|
||||||
double _old_av_note_height;
|
double _old_av_note_height;
|
||||||
|
|
||||||
PublicEditor& editor() const;
|
PublicEditor& editor() const;
|
||||||
|
bool show_scroomer () const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_piano_roll_header_h__ */
|
#endif /* __ardour_piano_roll_header_h__ */
|
||||||
|
|
Loading…
Reference in New Issue