diff options
author | David Robillard <drobilla@leibniz.local> | 2014-12-20 01:11:28 -0500 |
---|---|---|
committer | David Robillard <drobilla@leibniz.local> | 2014-12-20 01:13:25 -0500 |
commit | 670938c8c455f2ded443d0ea222ed1cd07ecc528 (patch) | |
tree | 9c58aae398dafb1eb2d8b106a91130c27f88991f /gtk2_ardour/editor.cc | |
parent | 5d8021bf44c066ad9b5ee4e8ab824267824be738 (diff) |
Fix various cursor problems.
Add a new scoped cursor system that makes it much harder to screw up and end up
with stick cursors and so on.
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 5e5c323f6a..cdc77dcc85 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -313,7 +313,6 @@ Editor::Editor () clicked_routeview = 0; clicked_control_point = 0; last_update_frame = 0; - pre_press_cursor = 0; last_paste_pos = 0; paste_count = 0; _drags = new DragManager (this); @@ -374,6 +373,7 @@ Editor::Editor () current_stepping_trackview = 0; entered_track = 0; entered_regionview = 0; + _entered_item_type = NoItem; entered_marker = 0; clear_entered_track = false; current_timefx = 0; @@ -400,7 +400,6 @@ Editor::Editor () zoom_focus = ZoomFocusLeft; _edit_point = EditAtMouse; - current_canvas_cursor = 0; _visible_track_count = -1; samples_per_pixel = 2048; /* too early to use reset_zoom () */ @@ -520,6 +519,9 @@ Editor::Editor () _cursors->set_cursor_set (ARDOUR_UI::config()->get_icon_set()); cerr << "Set cursor set to " << ARDOUR_UI::config()->get_icon_set() << endl; + /* Push default cursor to ever-present bottom of cursor stack. */ + push_canvas_cursor(_cursors->grabber); + ArdourCanvas::GtkCanvas* time_pad = manage (new ArdourCanvas::GtkCanvas ()); ArdourCanvas::Line* pad_line_1 = new ArdourCanvas::Line (time_pad->root()); @@ -2120,7 +2122,9 @@ Editor::set_edit_point_preference (EditPoint ep, bool force) edit_point_selector.set_text (str); } - reset_canvas_cursor (); + if (_entered_item_type != NoItem) { + choose_canvas_cursor_on_entry (_entered_item_type); + } if (!force && !changed) { return; @@ -5744,9 +5748,10 @@ Editor::ui_parameter_changed (string parameter) { if (parameter == "icon-set") { while (!_cursor_stack.empty()) { - _cursor_stack.pop(); + _cursor_stack.pop_back(); } _cursors->set_cursor_set (ARDOUR_UI::config()->get_icon_set()); + _cursor_stack.push_back(_cursors->grabber); } else if (parameter == "draggable-playhead") { if (_verbose_cursor) { playhead_cursor->set_sensitive (ARDOUR_UI::config()->get_draggable_playhead()); |