mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Don't bother opening a time FX dialog if we are just time stretching MIDI regions (#4679).
git-svn-id: svn://localhost/ardour2/branches/3.0@11402 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d2428e8510
commit
44283453bc
1 changed files with 13 additions and 2 deletions
|
|
@ -146,8 +146,20 @@ int
|
||||||
Editor::time_fx (RegionList& regions, float val, bool pitching)
|
Editor::time_fx (RegionList& regions, float val, bool pitching)
|
||||||
{
|
{
|
||||||
delete current_timefx;
|
delete current_timefx;
|
||||||
|
|
||||||
current_timefx = new TimeFXDialog (*this, pitching);
|
current_timefx = new TimeFXDialog (*this, pitching);
|
||||||
|
current_timefx->regions = regions;
|
||||||
|
|
||||||
|
/* See if we have any audio regions on our list */
|
||||||
|
RegionList::iterator i = regions.begin ();
|
||||||
|
while (i != regions.end() && boost::dynamic_pointer_cast<AudioRegion> (*i) == 0) {
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == regions.end ()) {
|
||||||
|
/* No audio regions; we can just do the timefx without a dialogue */
|
||||||
|
do_timefx (*current_timefx);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (current_timefx->run ()) {
|
switch (current_timefx->run ()) {
|
||||||
case RESPONSE_ACCEPT:
|
case RESPONSE_ACCEPT:
|
||||||
|
|
@ -158,7 +170,6 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
|
||||||
}
|
}
|
||||||
|
|
||||||
current_timefx->status = 0;
|
current_timefx->status = 0;
|
||||||
current_timefx->regions = regions;
|
|
||||||
|
|
||||||
if (pitching) {
|
if (pitching) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue