mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
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
8 changed files with 22 additions and 31 deletions
|
|
@ -971,11 +971,11 @@ style "pan_slider"
|
||||||
|
|
||||||
# used to draw the triangular indicators
|
# used to draw the triangular indicators
|
||||||
|
|
||||||
base[NORMAL] = { 0.803, 0.792, 0.619 }
|
base[NORMAL] = { 0.80, 0.80, 0.80 }
|
||||||
base[ACTIVE] = { 0.803, 0.792, 0.619 }
|
base[ACTIVE] = { 0.80, 0.80, 0.80 }
|
||||||
base[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
|
base[INSENSITIVE] = {0.32, 0.39, 0.45 } # matches default_base
|
||||||
base[SELECTED] = { 0.803, 0.792, 0.619 }
|
base[SELECTED] = { 0.80, 0.80, 0.80 }
|
||||||
base[PRELIGHT] = { 0.803, 0.792, 0.619 }
|
base[PRELIGHT] = { 0.80, 0.80, 0.80 }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,20 +52,20 @@ PannerBar::expose (GdkEventExpose* ev)
|
||||||
|
|
||||||
// center
|
// 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[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[1].y = 0;
|
||||||
|
|
||||||
points[2].x = darea.get_width()/2 - 1;
|
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);
|
gdk_draw_polygon (win->gobj(), gc->gobj(), true, points, 3);
|
||||||
|
|
||||||
// right
|
// right
|
||||||
|
|
||||||
points[0].x = darea.get_width() - triangle_size;
|
points[0].x = (darea.get_width() - triangle_size) - 1;
|
||||||
points[0].y = 0;
|
points[0].y = 0;
|
||||||
|
|
||||||
points[1].x = darea.get_width();
|
points[1].x = darea.get_width();
|
||||||
|
|
@ -116,9 +116,3 @@ PannerBar::button_release (GdkEventButton* ev)
|
||||||
return BarController::button_release (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 (Gtk::Adjustment& adj, PBD::Controllable&);
|
||||||
~PannerBar ();
|
~PannerBar ();
|
||||||
|
|
||||||
void on_size_request (Gtk::Requisition*);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool expose (GdkEventExpose*);
|
bool expose (GdkEventExpose*);
|
||||||
bool button_press (GdkEventButton*);
|
bool button_press (GdkEventButton*);
|
||||||
|
|
|
||||||
|
|
@ -1181,7 +1181,6 @@ RouteTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op)
|
||||||
|
|
||||||
playlist = ds->playlist();
|
playlist = ds->playlist();
|
||||||
|
|
||||||
|
|
||||||
TimeSelection time (selection.time);
|
TimeSelection time (selection.time);
|
||||||
float speed = ds->speed();
|
float speed = ds->speed();
|
||||||
if (speed != 1.0f) {
|
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) {
|
for (list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) {
|
||||||
if ((*i)->id == id) {
|
if ((*i)->id == id) {
|
||||||
|
SelectionRect* ret = (*i);
|
||||||
free_selection_rects.erase (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)
|
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)
|
: _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;
|
nframes_t end = start + cnt - 1;
|
||||||
|
|
||||||
init (hide);
|
init (hide);
|
||||||
|
|
||||||
|
in_set_state++;
|
||||||
|
|
||||||
for (RegionList::const_iterator i = other->regions.begin(); i != other->regions.end(); i++) {
|
for (RegionList::const_iterator i = other->regions.begin(); i != other->regions.end(); i++) {
|
||||||
|
|
||||||
boost::shared_ptr<Region> region;
|
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);
|
add_region_internal (new_region, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
in_set_state--;
|
||||||
|
|
||||||
/* this constructor does NOT notify others (session) */
|
/* 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 ();
|
pl->set_region_ownership ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* this factory method does NOT notify others */
|
/* this factory method does NOT notify others */
|
||||||
|
|
||||||
return pl;
|
return pl;
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,8 @@ BarController::button_press (GdkEventButton* ev)
|
||||||
bool
|
bool
|
||||||
BarController::button_release (GdkEventButton* ev)
|
BarController::button_release (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
|
double fract;
|
||||||
|
|
||||||
switch (ev->button) {
|
switch (ev->button) {
|
||||||
case 1:
|
case 1:
|
||||||
if (switch_on_release) {
|
if (switch_on_release) {
|
||||||
|
|
@ -150,15 +152,9 @@ BarController::button_release (GdkEventButton* ev)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (true) { // XXX FIX ME
|
|
||||||
/* relax */
|
|
||||||
} else {
|
|
||||||
double fract;
|
|
||||||
fract = ev->x / (darea.get_width() - 2.0);
|
fract = ev->x / (darea.get_width() - 2.0);
|
||||||
adjustment.set_value (adjustment.get_lower() +
|
adjustment.set_value (adjustment.get_lower() + fract * (adjustment.get_upper() - adjustment.get_lower()));
|
||||||
fract * (adjustment.get_upper() - adjustment.get_lower()));
|
break;
|
||||||
}
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue