fix crashing bug on cut operation; panner noodling
git-svn-id: svn://localhost/ardour2/trunk@1243 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
88acb20c73
commit
9946e615ca
@ -971,11 +971,11 @@ style "pan_slider"
|
||||
|
||||
# used to draw the triangular indicators
|
||||
|
||||
base[NORMAL] = { 0.803, 0.792, 0.619 }
|
||||
base[ACTIVE] = { 0.803, 0.792, 0.619 }
|
||||
base[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||
base[ACTIVE] = { 0.80, 0.80, 0.80 }
|
||||
base[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
|
||||
base[SELECTED] = { 0.803, 0.792, 0.619 }
|
||||
base[PRELIGHT] = { 0.803, 0.792, 0.619 }
|
||||
base[SELECTED] = { 0.80, 0.80, 0.80 }
|
||||
base[PRELIGHT] = { 0.80, 0.80, 0.80 }
|
||||
|
||||
}
|
||||
|
||||
|
@ -52,20 +52,20 @@ PannerBar::expose (GdkEventExpose* ev)
|
||||
|
||||
// center
|
||||
|
||||
points[0].x = darea.get_width()/2 - (triangle_size - 2);
|
||||
points[0].x = (darea.get_width()/2 - (triangle_size/2)) - 1;
|
||||
points[0].y = 0;
|
||||
|
||||
points[1].x = darea.get_width()/2 + (triangle_size - 2);
|
||||
points[1].x = (darea.get_width()/2 + (triangle_size/2)) - 1;
|
||||
points[1].y = 0;
|
||||
|
||||
points[2].x = darea.get_width()/2 - 1;
|
||||
points[2].y = triangle_size - 3;
|
||||
points[2].y = triangle_size - 1;
|
||||
|
||||
gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);
|
||||
|
||||
// right
|
||||
|
||||
points[0].x = darea.get_width() - triangle_size;
|
||||
points[0].x = (darea.get_width() - triangle_size) - 1;
|
||||
points[0].y = 0;
|
||||
|
||||
points[1].x = darea.get_width();
|
||||
@ -116,9 +116,3 @@ PannerBar::button_release (GdkEventButton* ev)
|
||||
return BarController::button_release (ev);
|
||||
}
|
||||
|
||||
void
|
||||
PannerBar::on_size_request (Gtk::Requisition* req)
|
||||
{
|
||||
req->width = -1;
|
||||
req->height = 50;
|
||||
}
|
||||
|
@ -9,8 +9,6 @@ class PannerBar : public Gtkmm2ext::BarController
|
||||
PannerBar (Gtk::Adjustment& adj, PBD::Controllable&);
|
||||
~PannerBar ();
|
||||
|
||||
void on_size_request (Gtk::Requisition*);
|
||||
|
||||
protected:
|
||||
bool expose (GdkEventExpose*);
|
||||
bool button_press (GdkEventButton*);
|
||||
|
@ -1181,7 +1181,6 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
|
||||
|
||||
playlist = ds->playlist();
|
||||
|
||||
|
||||
TimeSelection time (selection.time);
|
||||
float speed = ds->speed();
|
||||
if (speed != 1.0f) {
|
||||
|
@ -761,8 +761,9 @@ TimeAxisView::get_selection_rect (uint32_t id)
|
||||
|
||||
for (list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) {
|
||||
if ((*i)->id == id) {
|
||||
SelectionRect* ret = (*i);
|
||||
free_selection_rects.erase (i);
|
||||
return (*i);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,12 +122,14 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, boo
|
||||
Playlist::Playlist (boost::shared_ptr<const Playlist> other, nframes_t start, nframes_t cnt, string str, bool hide)
|
||||
: _name (str), _session (other->_session), _orig_diskstream_id(other->_orig_diskstream_id)
|
||||
{
|
||||
RegionLock rlock2 (&((Playlist&)other));
|
||||
|
||||
RegionLock rlock2 (const_cast<Playlist*> (other.get()));
|
||||
|
||||
nframes_t end = start + cnt - 1;
|
||||
|
||||
init (hide);
|
||||
|
||||
in_set_state++;
|
||||
|
||||
for (RegionList::const_iterator i = other->regions.begin(); i != other->regions.end(); i++) {
|
||||
|
||||
boost::shared_ptr<Region> region;
|
||||
@ -178,6 +180,8 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, nframes_t start, nf
|
||||
add_region_internal (new_region, position);
|
||||
}
|
||||
|
||||
in_set_state--;
|
||||
|
||||
/* this constructor does NOT notify others (session) */
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,6 @@ PlaylistFactory::create (boost::shared_ptr<const Playlist> old, nframes_t start,
|
||||
pl->set_region_ownership ();
|
||||
}
|
||||
|
||||
|
||||
/* this factory method does NOT notify others */
|
||||
|
||||
return pl;
|
||||
|
@ -121,6 +121,8 @@ BarController::button_press (GdkEventButton* ev)
|
||||
bool
|
||||
BarController::button_release (GdkEventButton* ev)
|
||||
{
|
||||
double fract;
|
||||
|
||||
switch (ev->button) {
|
||||
case 1:
|
||||
if (switch_on_release) {
|
||||
@ -150,16 +152,10 @@ BarController::button_release (GdkEventButton* ev)
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (true) { // XXX FIX ME
|
||||
/* relax */
|
||||
} else {
|
||||
double fract;
|
||||
fract = ev->x / (darea.get_width() - 2.0);
|
||||
adjustment.set_value (adjustment.get_lower() +
|
||||
fract * (adjustment.get_upper() - adjustment.get_lower()));
|
||||
}
|
||||
return true;
|
||||
|
||||
fract = ev->x / (darea.get_width() - 2.0);
|
||||
adjustment.set_value (adjustment.get_lower() + fract * (adjustment.get_upper() - adjustment.get_lower()));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user