Hopefully fix segfault.
git-svn-id: svn://localhost/ardour2/branches/3.0@6481 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4e4c75a34a
commit
92fbcd021d
@ -774,13 +774,15 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
boost::shared_ptr<Playlist> pl = t->diskstream()->playlist ();
|
||||
if (pl) {
|
||||
boost::shared_ptr<Region> r = pl->top_region_at (unit_to_frame (event->button.x));
|
||||
RegionView* rv = rtv->view()->find_view (r);
|
||||
clicked_selection = select_range_around_region (rv);
|
||||
_drags->add (new SelectionDrag (this, item, SelectionDrag::SelectionMove));
|
||||
list<RegionView*> rvs;
|
||||
rvs.push_back (rv);
|
||||
_drags->add (new RegionMoveDrag (this, item, rv, rvs, false, false));
|
||||
_drags->start_grab (event);
|
||||
if (r) {
|
||||
RegionView* rv = rtv->view()->find_view (r);
|
||||
clicked_selection = select_range_around_region (rv);
|
||||
_drags->add (new SelectionDrag (this, item, SelectionDrag::SelectionMove));
|
||||
list<RegionView*> rvs;
|
||||
rvs.push_back (rv);
|
||||
_drags->add (new RegionMoveDrag (this, item, rv, rvs, false, false));
|
||||
_drags->start_grab (event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1421,6 +1421,8 @@ Editor::deselect_all ()
|
||||
long
|
||||
Editor::select_range_around_region (RegionView* rv)
|
||||
{
|
||||
assert (rv);
|
||||
|
||||
selection->set (&rv->get_time_axis_view());
|
||||
|
||||
selection->time.clear ();
|
||||
|
Loading…
Reference in New Issue
Block a user