#include "ardour/types.h"
#include "actions.h"
+#include "ardour_ui.h"
#include "editor.h"
#include "time_axis_view.h"
#include "audio_time_axis.h"
{
ControlPoint* cp;
ArdourMarker * marker;
+ MeterMarker* m_marker = 0;
+ TempoMarker* t_marker = 0;
double fraction;
bool ret = true;
}
entered_marker = marker;
marker->set_color_rgba (UIConfiguration::instance().color ("entered marker"));
- // fall through
+ break;
+
case MeterMarkerItem:
+ if ((m_marker = static_cast<MeterMarker *> (item->get_data ("marker"))) == 0) {
+ break;
+ }
+ entered_marker = m_marker;
+ if (m_marker->meter().position_lock_style() == MusicTime) {
+ m_marker->set_color_rgba (UIConfiguration::instance().color ("meter marker"));
+ } else {
+ m_marker->set_color_rgba (UIConfiguration::instance().color ("meter marker music"));
+ }
+ break;
+
case TempoMarkerItem:
+ if ((t_marker = static_cast<TempoMarker *> (item->get_data ("marker"))) == 0) {
+ break;
+ }
+ entered_marker = t_marker;
+ if (t_marker->tempo().position_lock_style() == MusicTime) {
+ t_marker->set_color_rgba (UIConfiguration::instance().color ("tempo marker"));
+ } else {
+ t_marker->set_color_rgba (UIConfiguration::instance().color ("tempo marker music"));
+ }
break;
case FadeInHandleItem:
{
AutomationLine* al;
ArdourMarker *marker;
+ TempoMarker *t_marker;
+ MeterMarker *m_marker;
Location *loc;
bool is_start;
bool ret = true;
if ((loc = find_location_from_marker (marker, is_start)) != 0) {
location_flags_changed (loc);
}
- // fall through
+ break;
+
case MeterMarkerItem:
+ if ((m_marker = static_cast<MeterMarker *> (item->get_data ("marker"))) == 0) {
+ break;
+ }
+ entered_marker = 0;
+ if (m_marker->meter().position_lock_style() == MusicTime) {
+ m_marker->set_color_rgba (UIConfiguration::instance().color ("meter marker music"));
+ } else {
+ m_marker->set_color_rgba (UIConfiguration::instance().color ("meter marker"));
+ }
+ break;
+
case TempoMarkerItem:
+ if ((t_marker = static_cast<TempoMarker *> (item->get_data ("marker"))) == 0) {
+ break;
+ }
+ entered_marker = 0;
+ if (t_marker->tempo().position_lock_style() == MusicTime) {
+ t_marker->set_color_rgba (UIConfiguration::instance().color ("tempo marker music"));
+ } else {
+ t_marker->set_color_rgba (UIConfiguration::instance().color ("tempo marker"));
+ }
break;
case FadeInTrimHandleItem:
selection->clear ();
}
- reset_focus (&contents());
+ ARDOUR_UI::instance()->reset_focus (&contents());
}
/** Update _join_object_range_state which indicate whether we are over the top