summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-12-21 20:13:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-12-21 20:13:37 +0000
commit9946e615cac53998de4a48c5f1fe061efa6edf1e (patch)
tree5359342686169508254fa64484278c81d81b5760 /libs
parent88acb20c73c1818705d49add9d330f4df683999c (diff)
fix crashing bug on cut operation; panner noodling
git-svn-id: svn://localhost/ardour2/trunk@1243 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/playlist.cc8
-rw-r--r--libs/ardour/playlist_factory.cc1
-rw-r--r--libs/gtkmm2ext/barcontroller.cc16
3 files changed, 12 insertions, 13 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 8c1c608e1b..bdaa33f0aa 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -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) */
}
diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc
index f5f19d5b5b..636b09213d 100644
--- a/libs/ardour/playlist_factory.cc
+++ b/libs/ardour/playlist_factory.cc
@@ -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;
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc
index 618891e424..cfa56eefbc 100644
--- a/libs/gtkmm2ext/barcontroller.cc
+++ b/libs/gtkmm2ext/barcontroller.cc
@@ -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;