when doing a pure copy of a region, which resets the position, reset the position...
[ardour.git] / gtk2_ardour / time_axis_view.cc
index 8d2e94a13b5c32db140929b4675cc00e026ad5de..56dd2b746dc029ba4bb28e4123a4cf980b89dd41 100644 (file)
@@ -160,6 +160,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
                                  Gdk::SCROLL_MASK);
        controls_ebox.set_flags (CAN_FOCUS);
 
+       /* note that this handler connects *before* the default handler */
        controls_ebox.signal_scroll_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true);
        controls_ebox.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_press));
        controls_ebox.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_release));
@@ -319,10 +320,6 @@ TimeAxisView::clip_to_viewport ()
 bool
 TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
 {
-       if (Keyboard::some_magic_widget_has_focus()) {
-               return false;
-       }
-
        switch (ev->direction) {
        case GDK_SCROLL_UP:
                if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) {
@@ -651,7 +648,7 @@ bool
 TimeAxisView::name_entry_focus_in (GdkEventFocus*)
 {
        name_entry.select_region (0, -1);
-       name_entry.set_name ("EditorActiveTrackNameDisplay");
+       name_entry.set_state (STATE_SELECTED);
        return false;
 }
 
@@ -662,8 +659,8 @@ TimeAxisView::name_entry_focus_out (GdkEventFocus*)
 
        last_name_entry_key_press_event = 0;
        name_entry_key_timeout.disconnect ();
-       name_entry.set_name ("EditorTrackNameDisplay");
        name_entry.select_region (0,0);
+       name_entry.set_state (STATE_NORMAL);
 
        /* do the real stuff */