#include "ardour/types.h"
#include "actions.h"
+#include "ardour_ui.h"
#include "editor.h"
#include "time_axis_view.h"
#include "audio_time_axis.h"
if (eff_mouse_mode != MouseRange) {
AutomationLine* al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
std::list<Selectable*> selectables;
+ double mx = event->button.x;
+ double my = event->button.y;
+
+ al->grab_item().canvas_to_item (mx, my);
+
uint32_t before, after;
- framecnt_t const where = (framecnt_t) floor (event->button.x * samples_per_pixel);
+ framecnt_t const where = (framecnt_t) floor (mx * samples_per_pixel);
if (!al || !al->control_points_adjacent (where, before, after)) {
break;
{
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