diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-23 15:35:49 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-23 15:35:49 -0500 |
commit | 84f55440a3c6317dd2ab5d7e3d638016609e4d03 (patch) | |
tree | 2329f57523432a698f99927a2f070555fd31fe20 /gtk2_ardour/editor_videotimeline.cc | |
parent | e1bca03857070ba390bba729933c2d72ad5169fd (diff) | |
parent | dc7878760da040ad74b077318d2e9868d427199a (diff) |
fix redrawing of canvas with an optimized build
Best guess right now is that optimization does something bad when ceil() is called twice on a very large dbl-precision number,
which results in a zero (empty) redraw area. Without the removal of the redundant ceil & floor functions, no expose events
would be delivered to the canvas in an optimized build during drags (and maybe more).
Diffstat (limited to 'gtk2_ardour/editor_videotimeline.cc')
-rw-r--r-- | gtk2_ardour/editor_videotimeline.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk2_ardour/editor_videotimeline.cc b/gtk2_ardour/editor_videotimeline.cc index 83a9745b89..458393708a 100644 --- a/gtk2_ardour/editor_videotimeline.cc +++ b/gtk2_ardour/editor_videotimeline.cc @@ -80,13 +80,10 @@ Editor::toggle_video_timeline_locked () } void -Editor::embed_audio_from_video (std::string path, framepos_t n) +Editor::embed_audio_from_video (std::string path, framepos_t n, bool lock_position_to_video) { vector<std::string> paths; paths.push_back(path); -#if 0 - do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, ARDOUR::SrcBest, n); -#else current_interthread_info = &import_status; import_status.current = 1; import_status.total = paths.size (); @@ -98,13 +95,14 @@ Editor::embed_audio_from_video (std::string path, framepos_t n) boost::shared_ptr<ARDOUR::Track> track; bool ok = (import_sndfiles (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, ARDOUR::SrcBest, n, 1, 1, track, false) == 0); if (ok && track) { - boost::shared_ptr<ARDOUR::Playlist> pl = track->playlist(); - pl->find_next_region(n, ARDOUR::End, 0)->set_video_locked(true); + if (lock_position_to_video) { + boost::shared_ptr<ARDOUR::Playlist> pl = track->playlist(); + pl->find_next_region(n, ARDOUR::End, 0)->set_video_locked(true); + } _session->save_state (""); } import_status.all_done = true; -#endif unlink(path.c_str()); } |