Commit a4ddde63 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Hide history action for docs with no url

parent 69bb92f4
Pipeline #227858 passed with stage
in 6 minutes and 38 seconds
......@@ -375,13 +375,15 @@ void KateFileTree::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(m_filelistDeleteDocument);
menu.addAction(m_filelistReloadDocument);
auto a = menu.addAction(i18n("Show File Git History"));
connect(a, &QAction::triggered, this, [doc] {
auto url = doc->url();
if (url.isValid() && url.isLocalFile()) {
FileHistory::showFileHistory(url.toLocalFile());
}
});
if (doc->url().isValid() && doc->url().isLocalFile()) {
auto a = menu.addAction(i18n("Show File Git History"));
connect(a, &QAction::triggered, this, [doc] {
auto url = doc->url();
if (url.isValid() && url.isLocalFile()) {
FileHistory::showFileHistory(url.toLocalFile());
}
});
}
menu.addSeparator();
menu.addAction(m_filelistOpenContainingFolder);
......
Supports Markdown
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