Remove hopelessly inadequate attempt at last_item_entered

and ask the canvas where we are instead.  Should fix #4532.


git-svn-id: svn://localhost/ardour2/branches/3.0@10907 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-12-05 20:47:53 +00:00
parent c44e520d8c
commit 60fa99a34d
3 changed files with 5 additions and 6 deletions

View file

@ -332,7 +332,6 @@ Editor::Editor ()
current_interthread_info = 0;
_show_measures = true;
show_gain_after_trim = false;
last_item_entered = 0;
have_pending_keyboard_selection = false;
_follow_playhead = true;

View file

@ -1405,7 +1405,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
friend class EditorRouteGroups;
friend class EditorRegions;
ArdourCanvas::Item *last_item_entered;
/** true if the mouse is over a place where region trim can happen */
bool _over_region_trim_target;

View file

@ -302,8 +302,11 @@ Editor::set_canvas_cursor ()
}
/* up-down cursor as a cue that automation can be dragged up and down when in join object/range mode */
if (join_object_range_button.get_active() && last_item_entered) {
if (last_item_entered->property_parent() && (*last_item_entered->property_parent()).get_data (X_("timeselection"))) {
if (join_object_range_button.get_active()) {
double x, y;
get_pointer_position (x, y);
ArdourCanvas::Item* i = track_canvas->get_item_at (x, y);
if (i && i->property_parent() && (*i->property_parent()).get_data (X_("timeselection"))) {
pair<TimeAxisView*, int> tvp = trackview_by_y_position (_last_motion_y + vertical_adjustment.get_value() - canvas_timebars_vsize);
if (dynamic_cast<AutomationTimeAxisView*> (tvp.first)) {
current_canvas_cursor = _cursors->up_down;
@ -1590,8 +1593,6 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
double fraction;
bool ret = true;
last_item_entered = item;
switch (item_type) {
case ControlPointItem:
if (mouse_mode == MouseGain || mouse_mode == MouseObject) {