Remove unnecessary/unused template parameter from canvas sysex flags.
[ardour.git] / gtk2_ardour / automation_time_axis.cc
index 48c79040a1acafc892c59ded522c86fabf3336f7..f594901a287d19e6579a72968dceda0e3f2b3ee2 100644 (file)
@@ -211,7 +211,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
        
        /* no regions, just a single line for the entire track (e.g. bus gain) */
        } else {
-       
                boost::shared_ptr<AutomationLine> line(new AutomationLine (
                                        ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter()),
                                        *this,
@@ -379,10 +378,8 @@ AutomationTimeAxisView::set_height (uint32_t h)
 {
        bool changed = (height != (uint32_t) h) || first_call_to_set_height;
        bool changed_between_small_and_normal = ( 
-               (height < hNormal && h >= hNormal) || 
-               (height >= hNormal || 
-               h < hNormal)
-       );
+                  (height < hNormal && h >= hNormal)
+               || (height >= hNormal || h < hNormal) );
 
        TimeAxisView* state_parent = get_parent_with_state ();
        assert(state_parent);
@@ -513,20 +510,24 @@ AutomationTimeAxisView::build_display_menu ()
        auto_state_menu->set_name ("ArdourContextMenu");
        MenuList& as_items = auto_state_menu->items();
        
-       as_items.push_back (CheckMenuElem (_("Manual"), 
-                                          bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Off)));
+       as_items.push_back (CheckMenuElem (_("Manual"), bind (
+                       mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+                       (AutoState) Off)));
        auto_off_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
 
-       as_items.push_back (CheckMenuElem (_("Play"),
-                                          bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
+       as_items.push_back (CheckMenuElem (_("Play"), bind (
+                       mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+                       (AutoState) Play)));
        auto_play_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
 
-       as_items.push_back (CheckMenuElem (_("Write"),
-                                          bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
+       as_items.push_back (CheckMenuElem (_("Write"), bind (
+                       mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+                       (AutoState) Write)));
        auto_write_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
 
-       as_items.push_back (CheckMenuElem (_("Touch"),
-                                          bind (mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
+       as_items.push_back (CheckMenuElem (_("Touch"), bind (
+                       mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
+                       (AutoState) Touch)));
        auto_touch_item = dynamic_cast<CheckMenuItem*>(&as_items.back());
 
        items.push_back (MenuElem (_("State"), *auto_state_menu));
@@ -581,7 +582,7 @@ AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent
 
        /* map using line */
 
-       _line->view_to_model_y (y);
+       _line->view_to_model_coord (x, y);
 
        _session.begin_reversible_command (_("add automation event"));
        XMLNode& before = _control->alist()->get_state();
@@ -634,9 +635,11 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel
 
        if (what_we_got) {
                for (AutomationList::iterator x = what_we_got->begin(); x != what_we_got->end(); ++x) {
-                       double foo = (*x)->value;
-                       line.model_to_view_y (foo);
-                       (*x)->value = foo;
+                       double when = (*x)->when;
+                       double val  = (*x)->value;
+                       line.model_to_view_coord (when, val);
+                       (*x)->when = when;
+                       (*x)->value = val;
                }
        }
 
@@ -714,9 +717,11 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS
 
        if (what_we_got) {
                for (AutomationList::iterator x = what_we_got->begin(); x != what_we_got->end(); ++x) {
-                       double foo = (*x)->value;
-                       line.model_to_view_y (foo);
-                       (*x)->value = foo;
+                       double when = (*x)->when;
+                       double val  = (*x)->value;
+                       line.model_to_view_coord (when, val);
+                       (*x)->when = when;
+                       (*x)->value = val;
                }
        }
 
@@ -749,9 +754,11 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti
        AutomationList copy (**p);
 
        for (AutomationList::iterator x = copy.begin(); x != copy.end(); ++x) {
-               double foo = (*x)->value;
-               line.view_to_model_y (foo);
-               (*x)->value = foo;
+               double when = (*x)->when;
+               double val  = (*x)->value;
+               line.view_to_model_coord (when, val);
+               (*x)->when = when;
+               (*x)->value = val;
        }
 
        XMLNode &before = alist->get_state();
@@ -852,17 +859,6 @@ AutomationTimeAxisView::exited ()
                _line->track_exited();
 }
 
-/*void
-AutomationTimeAxisView::set_colors ()
-{
-    for (list<GhostRegion*>::iterator i=ghosts.begin(); i != ghosts.end(); i++ ) {
-               (*i)->set_colors();
-    }
-    
-       if (_line)
-               _line->set_colors();
-               }*/
-
 void
 AutomationTimeAxisView::color_handler () 
 {