summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_timefx.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-04 15:22:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-04 15:22:47 +0000
commit3077b251a183d265cd553a3006b5e76fcf4ab416 (patch)
treea00887ea0433372391642131132f49a6e97b443d /gtk2_ardour/editor_timefx.cc
parentab9a1eb34899e31f5a224bde3a9b6d83fc3557cb (diff)
don't create a TimeFX dialog unless we actually need one
git-svn-id: svn://localhost/ardour2/branches/3.0@12554 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_timefx.cc')
-rw-r--r--gtk2_ardour/editor_timefx.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 2f0b09ed17..ab836a28f4 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -144,8 +144,7 @@ int
Editor::time_fx (RegionList& regions, float val, bool pitching)
{
delete current_timefx;
- current_timefx = new TimeFXDialog (*this, pitching);
- current_timefx->regions = regions;
+ current_timefx = 0;
/* See if we have any audio regions on our list */
RegionList::iterator i = regions.begin ();
@@ -159,6 +158,9 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
return 0;
}
+ current_timefx = new TimeFXDialog (*this, pitching);
+ current_timefx->regions = regions;
+
switch (current_timefx->run ()) {
case RESPONSE_ACCEPT:
break;