From 997a3cd9cacad255a5e68e3e6b77ded26f65998d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 18 Sep 2016 21:32:53 +0200 Subject: [PATCH] GUI: fix results if there is problem only in header and not in file0. --- gui/resultstree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index 63f9a600e..df13ac7ff 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -493,18 +493,18 @@ void ResultsTree::RefreshTree() QStandardItem *ResultsTree::EnsureFileItem(const QString &fullpath, const QString &file0, bool hide) { - QString name = StripPath(fullpath, false); + QString name0 = QDir::toNativeSeparators(StripPath(file0, false)); + QString name = QDir::toNativeSeparators(StripPath(fullpath, false)); // Since item has path with native separators we must use path with // native separators to find it. - QStandardItem *item = FindFileItem(QDir::toNativeSeparators(name)); + QStandardItem *item = FindFileItem(name0); if (item) { return item; } // Ensure shown path is with native separators - name = QDir::toNativeSeparators(name); - item = CreateNormalItem(name); + item = CreateNormalItem(name0); item->setIcon(QIcon(":images/text-x-generic.png")); //Add user data to that item