Separate out creation of xrun markers from Editor::mouse_add_new_marker()
Remove the is_xrun parameter from Editor::mouse_add_new_marker(), and just create the marker directly in ARDOUR_UI::create_xrun_marker(), so that xrun markers don't become automatically selected when they appear.
This commit is contained in:
parent
7de6128169
commit
1973243a98
@ -3894,7 +3894,10 @@ ARDOUR_UI::keyboard_settings () const
|
|||||||
void
|
void
|
||||||
ARDOUR_UI::create_xrun_marker (framepos_t where)
|
ARDOUR_UI::create_xrun_marker (framepos_t where)
|
||||||
{
|
{
|
||||||
editor->mouse_add_new_marker (where, false, true);
|
if (_session) {
|
||||||
|
Location *location = new Location (*_session, where, where, _("xrun"), Location::IsMark);
|
||||||
|
_session->locations()->add (location);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -519,7 +519,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||||||
void metric_get_minsec (std::vector<ArdourCanvas::Ruler::Mark>&, gdouble, gdouble, gint);
|
void metric_get_minsec (std::vector<ArdourCanvas::Ruler::Mark>&, gdouble, gdouble, gint);
|
||||||
|
|
||||||
/* editing operations that need to be public */
|
/* editing operations that need to be public */
|
||||||
void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
|
void mouse_add_new_marker (framepos_t where, bool is_cd=false);
|
||||||
void split_regions_at (framepos_t, RegionSelection&);
|
void split_regions_at (framepos_t, RegionSelection&);
|
||||||
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
|
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
|
||||||
RegionSelection get_regions_from_selection_and_mouse (framepos_t);
|
RegionSelection get_regions_from_selection_and_mouse (framepos_t);
|
||||||
|
@ -636,21 +636,14 @@ Editor::LocationMarkers::setup_lines ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::mouse_add_new_marker (framepos_t where, bool is_cd, bool is_xrun)
|
Editor::mouse_add_new_marker (framepos_t where, bool is_cd)
|
||||||
{
|
{
|
||||||
string markername, markerprefix;
|
string markername;
|
||||||
int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark);
|
int flags = (is_cd ? Location::IsCDMarker|Location::IsMark : Location::IsMark);
|
||||||
|
|
||||||
if (is_xrun) {
|
|
||||||
markerprefix = "xrun";
|
|
||||||
flags = Location::IsMark;
|
|
||||||
} else {
|
|
||||||
markerprefix = "mark";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
_session->locations()->next_available_name(markername, markerprefix);
|
_session->locations()->next_available_name(markername, _("mark"));
|
||||||
if (!is_xrun && !choose_new_marker_name(markername)) {
|
if (!choose_new_marker_name(markername)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Location *location = new Location (*_session, where, where, markername, (Location::Flags) flags);
|
Location *location = new Location (*_session, where, where, markername, (Location::Flags) flags);
|
||||||
|
@ -208,7 +208,7 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
|||||||
|
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case MarkerBarItem:
|
case MarkerBarItem:
|
||||||
ruler_items.push_back (MenuElem (_("New location marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, false, false)));
|
ruler_items.push_back (MenuElem (_("New location marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, false)));
|
||||||
ruler_items.push_back (MenuElem (_("Clear all locations"), sigc::mem_fun(*this, &Editor::clear_markers)));
|
ruler_items.push_back (MenuElem (_("Clear all locations"), sigc::mem_fun(*this, &Editor::clear_markers)));
|
||||||
ruler_items.push_back (MenuElem (_("Unhide locations"), sigc::mem_fun(*this, &Editor::unhide_markers)));
|
ruler_items.push_back (MenuElem (_("Unhide locations"), sigc::mem_fun(*this, &Editor::unhide_markers)));
|
||||||
ruler_items.push_back (SeparatorElem ());
|
ruler_items.push_back (SeparatorElem ());
|
||||||
@ -226,7 +226,7 @@ Editor::popup_ruler_menu (framepos_t where, ItemType t)
|
|||||||
|
|
||||||
case CdMarkerBarItem:
|
case CdMarkerBarItem:
|
||||||
// TODO
|
// TODO
|
||||||
ruler_items.push_back (MenuElem (_("New CD track marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, true, false)));
|
ruler_items.push_back (MenuElem (_("New CD track marker"), sigc::bind ( sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, true)));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi
|
|||||||
virtual void toggle_meter_updating() = 0;
|
virtual void toggle_meter_updating() = 0;
|
||||||
virtual void split_regions_at (framepos_t, RegionSelection&) = 0;
|
virtual void split_regions_at (framepos_t, RegionSelection&) = 0;
|
||||||
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
|
||||||
virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false) = 0;
|
virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false) = 0;
|
||||||
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
|
||||||
virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0;
|
virtual void add_to_idle_resize (TimeAxisView*, int32_t) = 0;
|
||||||
virtual framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next) = 0;
|
virtual framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next) = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user