Commit 9f7508af authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Don't remove root path for now


Signed-off-by: Waqar Ahmed's avatarWaqar Ahmed <waqar.17a@gmail.com>
parent f4515bca
......@@ -197,9 +197,8 @@ public:
class LocationTreeDelegate : public QStyledItemDelegate
{
public:
LocationTreeDelegate(QObject *parent, const QString &root, const QFont &font)
LocationTreeDelegate(QObject *parent, const QFont &font)
: QStyledItemDelegate(parent)
, m_root(root)
, m_monoFont(font)
{
}
......@@ -216,8 +215,6 @@ public:
options.text = QString(); // clear old text
options.widget->style()->drawControl(QStyle::CE_ItemViewItem, &options, painter, options.widget);
text.remove(m_root);
QVector<QTextLayout::FormatRange> formats;
if (!text.startsWith(QStringLiteral("Line: "))) {
int lastSlash = text.lastIndexOf(QLatin1Char('/'));
......@@ -243,7 +240,6 @@ public:
}
private:
QString m_root;
QFont m_monoFont;
};
......@@ -834,12 +830,7 @@ public:
treeView->setEditTriggers(QAbstractItemView::NoEditTriggers);
// styling
QString root;
auto activeView = m_mainWindow->activeView();
if (auto s = m_serverManager->findServer(activeView)) {
root = s->root().toLocalFile();
}
treeView->setItemDelegate(new LocationTreeDelegate(treeView, root, getEditorFont()));
treeView->setItemDelegate(new LocationTreeDelegate(treeView, getEditorFont()));
// context menu
treeView->setContextMenuPolicy(Qt::CustomContextMenu);
......
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