stop auto-play from trying to play things that are not soundfiles
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Nov 2007 05:09:19 +0000 (05:09 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 7 Nov 2007 05:09:19 +0000 (05:09 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2604 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/sfdb_ui.cc

index 7a1476f275b7e322f476ca1a12f423bd64e13cec..aef6c3852c32eeff71e03847d2ce403349e30f25 100644 (file)
@@ -552,10 +552,10 @@ SoundFileBrowser::on_custom (const FileFilter::Info& filter_info)
 void
 SoundFileBrowser::update_preview ()
 {
-       preview.setup_labels (chooser.get_filename());
-
-       if (preview.autoplay()) {
-               Glib::signal_idle().connect (mem_fun (preview, &SoundFileBox::audition_oneshot));
+       if (preview.setup_labels (chooser.get_filename())) {
+               if (preview.autoplay()) {
+                       Glib::signal_idle().connect (mem_fun (preview, &SoundFileBox::audition_oneshot));
+               }
        }
 }