Commit 6a2fad36 authored by Camilo higuita's avatar Camilo higuita

rescan on dir changes

parent 0826c283
......@@ -46,7 +46,8 @@ Gallery::Gallery(QObject *parent) : MauiList(parent)
connect(m_watcher, &QFileSystemWatcher::directoryChanged, [this](QString dir)
{
qDebug()<< "Dir changed" << dir;
this->scan({QUrl::fromLocalFile(dir)}, m_recursive);
this->rescan();
// this->scan({QUrl::fromLocalFile(dir)}, m_recursive);
});
connect(m_watcher, &QFileSystemWatcher::fileChanged, [this](QString file)
......@@ -236,6 +237,7 @@ void Gallery::clear()
void Gallery::rescan()
{
this->clear();
this->scan(m_urls, m_recursive);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment