Overload toggleVisible() to update list with media from other interfaces.
[vlc.git] / modules / gui / qt4 / dialogs / vlm.cpp
index adaf2d2..b8232d3 100644 (file)
@@ -835,5 +835,20 @@ void VLMWrapper::EditSchedule( const QString name, const QString input,
     }
 }
 
+void VLMDialog::toggleVisible()
+{
+    QList<VLMAWidget *>::iterator it;
+    for( it = vlmItems.begin(); it != vlmItems.end(); it++ )
+    {
+        VLMAWidget *item =  *it;
+        delete item;
+        item = NULL;
+    }
+    vlmItems.clear();
+    ui.vlmListItem->clear();
+    mediasPopulator();
+    QVLCDialog::toggleVisible();
+}
+
 
 #endif