Commit dfa37a8f authored by Marco Bubke's avatar Marco Bubke

QmlDesigner.NodeInstances: Check if the path is already watched

parent aa453c80
......@@ -489,15 +489,18 @@ Internal::ChildrenChangeEventFilter *NodeInstanceServer::childrenChangeEventFilt
void NodeInstanceServer::addFilePropertyToFileSystemWatcher(QObject *object, const QString &propertyName, const QString &path)
{
m_fileSystemWatcherHash.insert(path, ObjectPropertyPair(object, propertyName));
fileSystemWatcher()->addPath(path);
if (!m_fileSystemWatcherHash.contains(path)) {
m_fileSystemWatcherHash.insert(path, ObjectPropertyPair(object, propertyName));
fileSystemWatcher()->addPath(path);
}
}
void NodeInstanceServer::removeFilePropertyFromFileSystemWatcher(QObject *object, const QString &propertyName, const QString &path)
{
fileSystemWatcher()->removePath(path);
m_fileSystemWatcherHash.remove(path, ObjectPropertyPair(object, propertyName));
if (m_fileSystemWatcherHash.contains(path)) {
fileSystemWatcher()->removePath(path);
m_fileSystemWatcherHash.remove(path, ObjectPropertyPair(object, propertyName));
}
}
void NodeInstanceServer::refreshLocalFileProperty(const QString &path)
......
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