mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
fix copy-drag SNAFU; fix shuffling playhead when zoom gets so low that rounding errors cause an iterative convergence on the "true" position if zoom-focus = playhead
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2914 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cc607b9fb9
commit
679e7fcffa
6 changed files with 68 additions and 31 deletions
|
|
@ -3001,7 +3001,7 @@ Editor::possibly_copy_regions_during_grab (GdkEvent* event)
|
||||||
/* reset selection to new regionviews */
|
/* reset selection to new regionviews */
|
||||||
|
|
||||||
selection->set (new_regionviews);
|
selection->set (new_regionviews);
|
||||||
|
|
||||||
/* reset drag_info data to reflect the fact that we are dragging the copies */
|
/* reset drag_info data to reflect the fact that we are dragging the copies */
|
||||||
|
|
||||||
drag_info.data = new_regionviews.front();
|
drag_info.data = new_regionviews.front();
|
||||||
|
|
@ -3400,7 +3400,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||||
|
|
||||||
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
|
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
|
||||||
const list<RegionView*>& layered_regions = selection->regions.by_layer();
|
const list<RegionView*>& layered_regions = selection->regions.by_layer();
|
||||||
|
|
||||||
for (list<RegionView*>::const_iterator i = layered_regions.begin(); i != layered_regions.end(); ++i) {
|
for (list<RegionView*>::const_iterator i = layered_regions.begin(); i != layered_regions.end(); ++i) {
|
||||||
|
|
||||||
RegionView* rv = (*i);
|
RegionView* rv = (*i);
|
||||||
|
|
@ -3765,7 +3765,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
|
||||||
sigc::connection c = atv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
|
sigc::connection c = atv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
|
||||||
to_playlist->add_region (newregion, (nframes_t) (where * atv->get_diskstream()->speed()));
|
to_playlist->add_region (newregion, (nframes_t) (where * atv->get_diskstream()->speed()));
|
||||||
c.disconnect ();
|
c.disconnect ();
|
||||||
|
|
||||||
if (!latest_regionviews.empty()) {
|
if (!latest_regionviews.empty()) {
|
||||||
// XXX why just the first one ? we only expect one
|
// XXX why just the first one ? we only expect one
|
||||||
atv->reveal_dependent_views (*latest_regionviews.front());
|
atv->reveal_dependent_views (*latest_regionviews.front());
|
||||||
|
|
|
||||||
|
|
@ -1520,6 +1520,12 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
double nfpu;
|
double nfpu;
|
||||||
double l;
|
double l;
|
||||||
|
|
||||||
|
/* XXX this limit is also in ::set_frames_per_unit() */
|
||||||
|
|
||||||
|
if (frames_per_unit <= 2.0 && fpu <= frames_per_unit) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nfpu = fpu;
|
nfpu = fpu;
|
||||||
|
|
||||||
new_page_size = (nframes_t) floor (canvas_width * nfpu);
|
new_page_size = (nframes_t) floor (canvas_width * nfpu);
|
||||||
|
|
@ -1554,7 +1560,7 @@ Editor::temporal_zoom (gdouble fpu)
|
||||||
where = playhead_cursor->current_frame;
|
where = playhead_cursor->current_frame;
|
||||||
|
|
||||||
l = - ((new_page_size * ((where - current_leftmost)/(double)current_page)) - where);
|
l = - ((new_page_size * ((where - current_leftmost)/(double)current_page)) - where);
|
||||||
|
|
||||||
if (l < 0) {
|
if (l < 0) {
|
||||||
leftmost_after_zoom = 0;
|
leftmost_after_zoom = 0;
|
||||||
} else if (l > max_frames) {
|
} else if (l > max_frames) {
|
||||||
|
|
|
||||||
|
|
@ -428,11 +428,21 @@ EngineControl::build_command_line (vector<string>& cmd)
|
||||||
cmd.push_back ("netjack");
|
cmd.push_back ("netjack");
|
||||||
} else if (driver == X_("FFADO")) {
|
} else if (driver == X_("FFADO")) {
|
||||||
using_ffado = true;
|
using_ffado = true;
|
||||||
cmd.push_back ("firewire");
|
|
||||||
|
/* do this until FFADO becomes the standard */
|
||||||
|
|
||||||
|
char* hack = getenv ("ARDOUR_FIREWIRE_DRIVER_NAME");
|
||||||
|
|
||||||
|
if (hack) {
|
||||||
|
cmd.push_back (hack);
|
||||||
|
} else {
|
||||||
|
cmd.push_back ("freebob");
|
||||||
|
}
|
||||||
|
|
||||||
} else if ( driver == X_("Dummy")) {
|
} else if ( driver == X_("Dummy")) {
|
||||||
using_dummy = true;
|
using_dummy = true;
|
||||||
cmd.push_back ("dummy");
|
cmd.push_back ("dummy");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* driver arguments */
|
/* driver arguments */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,11 @@ PlugUIBase::bypass_toggled ()
|
||||||
|
|
||||||
if ((x = bypass_button.get_active()) == insert->active()) {
|
if ((x = bypass_button.get_active()) == insert->active()) {
|
||||||
insert->set_active (!x, this);
|
insert->set_active (!x, this);
|
||||||
|
if (insert->active()) {
|
||||||
|
bypass_button.set_label (_("Bypass"));
|
||||||
|
} else {
|
||||||
|
bypass_button.set_label (_("Active"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -328,12 +328,47 @@ Selection::add (TimeAxisView* track)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Selection::add (vector<RegionView*>& v)
|
||||||
|
{
|
||||||
|
/* XXX This method or the add (const RegionSelection&) needs to go
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
|
||||||
|
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
|
||||||
|
changed = regions.add ((*i));
|
||||||
|
if (Config->get_link_region_and_track_selection() && changed) {
|
||||||
|
add (&(*i)->get_trackview());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
|
RegionsChanged ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Selection::add (const RegionSelection& rs)
|
Selection::add (const RegionSelection& rs)
|
||||||
{
|
{
|
||||||
if (!rs.empty()) {
|
/* XXX This method or the add (const vector<RegionView*>&) needs to go
|
||||||
regions.insert (regions.end(), rs.begin(), rs.end());
|
*/
|
||||||
RegionsChanged(); /* EMIT SIGNAL */
|
|
||||||
|
bool changed = false;
|
||||||
|
|
||||||
|
for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) {
|
||||||
|
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
|
||||||
|
changed = regions.add ((*i));
|
||||||
|
if (Config->get_link_region_and_track_selection() && changed) {
|
||||||
|
add (&(*i)->get_trackview());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
|
RegionsChanged ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -349,25 +384,6 @@ Selection::add (RegionView* r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Selection::add (vector<RegionView*>& v)
|
|
||||||
{
|
|
||||||
bool changed = false;
|
|
||||||
|
|
||||||
for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
|
|
||||||
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
|
|
||||||
changed = regions.add ((*i));
|
|
||||||
if (Config->get_link_region_and_track_selection() && changed) {
|
|
||||||
add (&(*i)->get_trackview());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changed) {
|
|
||||||
RegionsChanged ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
long
|
long
|
||||||
Selection::add (nframes_t start, nframes_t end)
|
Selection::add (nframes_t start, nframes_t end)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __ardour_svn_revision_h__
|
#ifndef __ardour_svn_revision_h__
|
||||||
#define __ardour_svn_revision_h__
|
#define __ardour_svn_revision_h__
|
||||||
static const char* ardour_svn_revision = "2884";
|
static const char* ardour_svn_revision = "2903";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue