summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-12-01 13:25:07 +0000
committerCarl Hetherington <carl@carlh.net>2009-12-01 13:25:07 +0000
commit63484d5c9a7f89a2d9e37723045ce7e8cd4b991e (patch)
treee6546b8af5525b4e5a42e02f07a93fb4486e808c
parentd2426538ad8230e62cf4c8f225e6e974aea9e115 (diff)
Reset the dialog when it is closed with partial (incomplete) changes to clocks. Fixes part of #254.
git-svn-id: svn://localhost/ardour2/branches/3.0@6246 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/audio_region_editor.cc9
-rw-r--r--gtk2_ardour/audio_region_editor.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc
index 6fa06be460..1b5f51eb83 100644
--- a/gtk2_ardour/audio_region_editor.cc
+++ b/gtk2_ardour/audio_region_editor.cc
@@ -153,7 +153,7 @@ AudioRegionEditor::AudioRegionEditor (Session& s, boost::shared_ptr<AudioRegion>
show_all();
name_changed ();
- bounds_changed (Change (StartChanged|LengthChanged|PositionChanged|StartChanged|Region::SyncOffsetChanged));
+ bounds_changed (Change (StartChanged|LengthChanged|PositionChanged|Region::SyncOffsetChanged));
gain_changed ();
_region->StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
@@ -408,3 +408,10 @@ AudioRegionEditor::sync_offset_relative_clock_changed ()
_session.commit_reversible_command ();
}
+
+bool
+AudioRegionEditor::on_delete_event (GdkEventAny* ev)
+{
+ bounds_changed (Change (StartChanged|LengthChanged|PositionChanged|Region::SyncOffsetChanged));
+ return RegionEditor::on_delete_event (ev);
+}
diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h
index 25c3037908..3de1522734 100644
--- a/gtk2_ardour/audio_region_editor.h
+++ b/gtk2_ardour/audio_region_editor.h
@@ -116,6 +116,8 @@ class AudioRegionEditor : public RegionEditor
gint bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)());
gint breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)());
+ bool on_delete_event (GdkEventAny *);
+
bool spin_arrow_grab;
};