From f7abf2de82d2bf97eaa7395b7056771197f1fe36 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 8 Apr 2013 21:17:48 +0200 Subject: [PATCH] vtl: mark session dirty if video position-lock or timeline height changes --- gtk2_ardour/video_timeline.cc | 19 +++++++++++++++++++ gtk2_ardour/video_timeline.h | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index 729ac05ed3..269e465623 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -228,6 +228,22 @@ VideoTimeLine::set_session (ARDOUR::Session *s) _session->config.ParameterChanged.connect (*this, invalidator (*this), ui_bind (&VideoTimeLine::parameter_changed, this, _1), gui_context()); } +void +VideoTimeLine::set_offset_locked (bool v) { + if (_session && v != video_offset_lock) { + _session->set_dirty (); + } + video_offset_lock = v; +} + +void +VideoTimeLine::toggle_offset_locked () { + video_offset_lock = !video_offset_lock; + if (_session) { + _session->set_dirty (); + } +} + void VideoTimeLine::save_undo () { @@ -614,6 +630,9 @@ VideoTimeLine::gui_update(std::string const & t) { void VideoTimeLine::set_height (int height) { + if (_session && bar_height != height) { + _session->set_dirty (); + } bar_height = height; flush_local_cache(); } diff --git a/gtk2_ardour/video_timeline.h b/gtk2_ardour/video_timeline.h index ab1a9a92d8..559709d708 100644 --- a/gtk2_ardour/video_timeline.h +++ b/gtk2_ardour/video_timeline.h @@ -72,8 +72,8 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p double get_video_file_fps () { return video_file_fps; } void set_update_session_fps (bool v=true) { auto_set_session_fps = v; } - void set_offset_locked (bool v) { video_offset_lock = v; } - void toggle_offset_locked () { video_offset_lock = !video_offset_lock; } + void set_offset_locked (bool v); + void toggle_offset_locked (); bool is_offset_locked () { return video_offset_lock; } void open_video_monitor (); -- 2.30.2