13
0

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
This commit is contained in:
Nick Mainsbridge 2009-12-11 12:13:59 +00:00
parent 53bbac4eb6
commit 3367e41278
3 changed files with 7 additions and 17 deletions

View File

@ -1282,7 +1282,6 @@ class Editor : public PublicEditor
void set_fade_out_active (bool); void set_fade_out_active (bool);
std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists; std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
RegionSelection pre_drag_region_selection;
bool _dragging_playhead; bool _dragging_playhead;
bool _dragging_edit_point; bool _dragging_edit_point;

View File

@ -185,16 +185,6 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
bool const yp = (::llabs ((nframes64_t) (_current_pointer_y - _grab_y)) > 4LL); bool const yp = (::llabs ((nframes64_t) (_current_pointer_y - _grab_y)) > 4LL);
_move_threshold_passed = (xp || yp); _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; bool old_had_movement = _had_movement;
@ -207,7 +197,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
_had_movement = false; _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 (event->motion.state & Gdk::BUTTON1_MASK || event->motion.state & Gdk::BUTTON2_MASK) {
if (!from_autoscroll) { if (!from_autoscroll) {
@ -742,11 +732,6 @@ RegionMoveDrag::finished (GdkEvent* /*event*/, bool movement_occurred)
return; 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) { if (_brushing) {
/* all changes were made during motion event handlers */ /* all changes were made during motion event handlers */
@ -1035,6 +1020,10 @@ RegionMotionDrag::copy_regions (GdkEvent* event)
if (rv == _primary) { if (rv == _primary) {
_primary = nrv; _primary = nrv;
} }
/* ..and deselect the one we copied */
rv->set_selected (false);
} }
if (new_regionviews.empty()) { if (new_regionviews.empty()) {

View File

@ -128,6 +128,8 @@ TimeAxisViewItem::TimeAxisViewItem (const TimeAxisViewItem& other)
group = new ArdourCanvas::Group (*parent); group = new ArdourCanvas::Group (*parent);
_selected = other._selected;
init ( init (
other.item_name, other.samples_per_unit, c, other.frame_position, 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 other.item_duration, other.visibility, other.wide_enough_for_name, other.high_enough_for_name