do not start editing track/bus names on a single click in the name entry of the track header - require double click; show name label rather than name entry when rec-enabled, to allow using the name area for track selection (name entry would have been visually still available for editing, which is misleading
git-svn-id: svn://localhost/ardour2/branches/3.0@13738 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3b8b088bd8
commit
4481cca74a
@ -246,7 +246,8 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||
|
||||
/* pick up the correct freeze state */
|
||||
map_frozen ();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_editor.ZoomChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::reset_samples_per_unit));
|
||||
_editor.HorizontalPositionChanged.connect (sigc::mem_fun (*this, &RouteTimeAxisView::horizontal_position_changed));
|
||||
@ -263,9 +264,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
||||
gm.get_gain_slider().set_name ("GainFader");
|
||||
|
||||
gm.get_level_meter().signal_scroll_event().connect (sigc::mem_fun (*this, &RouteTimeAxisView::controls_ebox_scroll), false);
|
||||
|
||||
show_name_entry ();
|
||||
hide_name_label ();
|
||||
}
|
||||
|
||||
RouteTimeAxisView::~RouteTimeAxisView ()
|
||||
@ -2174,11 +2172,26 @@ RouteTimeAxisView::reset_processor_automation_curves ()
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
RouteTimeAxisView::can_edit_name () const
|
||||
{
|
||||
/* we do not allow track name changes if it is record enabled
|
||||
*/
|
||||
return !_route->record_enabled();
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::update_rec_display ()
|
||||
{
|
||||
RouteUI::update_rec_display ();
|
||||
name_entry.set_sensitive (!_route->record_enabled());
|
||||
|
||||
if (_route->record_enabled()) {
|
||||
hide_name_entry ();
|
||||
show_name_label ();
|
||||
} else {
|
||||
hide_name_label ();
|
||||
show_name_entry ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -232,20 +232,14 @@ protected:
|
||||
virtual void hide_all_automation (bool apply_to_selection = false);
|
||||
|
||||
void timestretch (framepos_t start, framepos_t end);
|
||||
|
||||
void speed_changed ();
|
||||
|
||||
void map_frozen ();
|
||||
|
||||
void color_handler ();
|
||||
|
||||
void region_view_added (RegionView*);
|
||||
|
||||
void create_gain_automation_child (const Evoral::Parameter &, bool);
|
||||
|
||||
void setup_processor_menu_and_curves ();
|
||||
|
||||
void route_color_changed ();
|
||||
bool can_edit_name() const;
|
||||
|
||||
boost::shared_ptr<AutomationTimeAxisView> gain_track;
|
||||
|
||||
|
@ -229,14 +229,18 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
||||
rec_enable_button->show();
|
||||
rec_enable_button->set_controllable (t->rec_enable_control());
|
||||
|
||||
update_rec_display ();
|
||||
|
||||
if (is_midi_track()) {
|
||||
midi_track()->StepEditStatusChange.connect (route_connections, invalidator (*this),
|
||||
boost::bind (&RouteUI::step_edit_changed, this, _1), gui_context());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* this will work for busses and tracks, and needs to be called to
|
||||
set up the name entry/name label display.
|
||||
*/
|
||||
|
||||
update_rec_display ();
|
||||
|
||||
if (is_track()) {
|
||||
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
|
||||
|
@ -112,8 +112,8 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
||||
*/
|
||||
|
||||
name_entry.set_name ("EditorTrackNameDisplay");
|
||||
name_entry.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_button_release));
|
||||
name_entry.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_button_press));
|
||||
name_entry.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_button_release), false);
|
||||
name_entry.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_button_press), false);
|
||||
name_entry.signal_key_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_key_release));
|
||||
name_entry.signal_activate().connect (sigc::mem_fun(*this, &TimeAxisView::name_entry_activated));
|
||||
name_entry.signal_focus_in_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_focus_in));
|
||||
@ -682,13 +682,31 @@ TimeAxisView::name_entry_changed ()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
TimeAxisView::can_edit_name () const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
TimeAxisView::name_entry_button_press (GdkEventButton *ev)
|
||||
{
|
||||
if (ev->button == 3) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
if (ev->button == 1) {
|
||||
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||
if (can_edit_name()) {
|
||||
name_entry.grab_focus ();
|
||||
name_entry.start_editing ((GdkEvent*) ev);
|
||||
}
|
||||
} else {
|
||||
conditionally_add_to_selection ();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -214,6 +214,8 @@ class TimeAxisView : public virtual AxisView
|
||||
std::string controls_base_unselected_name;
|
||||
std::string controls_base_selected_name;
|
||||
|
||||
virtual bool can_edit_name() const;
|
||||
|
||||
bool name_entry_button_press (GdkEventButton *ev);
|
||||
bool name_entry_button_release (GdkEventButton *ev);
|
||||
bool name_entry_key_release (GdkEventKey *ev);
|
||||
|
Loading…
Reference in New Issue
Block a user