summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2009-12-11 12:13:59 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2009-12-11 12:13:59 +0000
commit3367e41278c26fbe6210a563451bdd238540f538 (patch)
tree0ac304bac38e010540588e046bfa52c5aaac9080 /gtk2_ardour
parent53bbac4eb676e27e001caf60b36a8f33e5aa9553 (diff)
Remove unused pre_drag_region_selection, fix ugly regions when drag-copying (TimeAxisViewItem constructor), fix broken drag threshold, don't reset _grab_frame etc. when move threshold passed, fix region selection during region copy drag.
git-svn-id: svn://localhost/ardour2/branches/3.0@6348 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.h1
-rw-r--r--gtk2_ardour/editor_drag.cc21
-rw-r--r--gtk2_ardour/time_axis_view_item.cc2
3 files changed, 7 insertions, 17 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 49135f0f9e..928a43ce86 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -1282,7 +1282,6 @@ class Editor : public PublicEditor
void set_fade_out_active (bool);
std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
- RegionSelection pre_drag_region_selection;
bool _dragging_playhead;
bool _dragging_edit_point;
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 66ffc7bbe6..ac2f1808c0 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -185,16 +185,6 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
bool const yp = (::llabs ((nframes64_t) (_current_pointer_y - _grab_y)) > 4LL);
_move_threshold_passed = (xp || yp);
-
- if (apply_move_threshold() && _move_threshold_passed) {
-
- _grab_frame = _current_pointer_frame;
- _grab_x = _current_pointer_x;
- _grab_y = _current_pointer_y;
- _last_pointer_frame = _grab_frame;
- _pointer_frame_offset = _grab_frame - _last_frame_position;
-
- }
}
bool old_had_movement = _had_movement;
@@ -207,7 +197,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
_had_movement = false;
}
- if (active (_editor->mouse_mode)) {
+ if (active (_editor->mouse_mode) && _had_movement) {
if (event->motion.state & Gdk::BUTTON1_MASK || event->motion.state & Gdk::BUTTON2_MASK) {
if (!from_autoscroll) {
@@ -742,11 +732,6 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
return;
}
- if (Config->get_edit_mode() == Splice && !_editor->pre_drag_region_selection.empty()) {
- _editor->selection->set (_editor->pre_drag_region_selection);
- _editor->pre_drag_region_selection.clear ();
- }
-
if (_brushing) {
/* all changes were made during motion event handlers */
@@ -1035,6 +1020,10 @@ RegionMotionDrag::copy_regions (GdkEvent* event)
if (rv == _primary) {
_primary = nrv;
}
+
+ /* ..and deselect the one we copied */
+
+ rv->set_selected (false);
}
if (new_regionviews.empty()) {
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc
index 255ffce410..2a30aab405 100644
--- a/gtk2_ardour/time_axis_view_item.cc
+++ b/gtk2_ardour/time_axis_view_item.cc
@@ -128,6 +128,8 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
group = new ArdourCanvas::Group (*parent);
+ _selected = other._selected;
+
init (
other.item_name, other.samples_per_unit, c, other.frame_position,
other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name