forked from qt-creator/qt-creator
QmlDesigner: Do not reset CustomFileSystemModel if root path is identical
If the idendtical root path is set again, we should not do anything. Task-number: QTCREATORBUG-22217 Change-Id: Ifab8e51fd892a5145a0f583e686e16ca6b8d6912 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
8fe6d2181e
commit
6ad90c7daa
@@ -117,6 +117,9 @@ QString filterMetaIcons(const QString &fileName)
|
||||
|
||||
QModelIndex CustomFileSystemModel::setRootPath(const QString &newPath)
|
||||
{
|
||||
if (m_fileSystemModel->rootPath() == newPath)
|
||||
return QAbstractListModel::index(0, 0);
|
||||
|
||||
beginResetModel();
|
||||
m_fileSystemModel->setRootPath(newPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user