diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-01-22 01:40:56 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-04 03:33:21 -0500 |
| commit | 6005da618775d545c664371f53571a75eacab7f2 (patch) | |
| tree | c5cba8758389a557f64c5af0dd8731f042ccbdb6 /src/filetree.cpp | |
| parent | a7a406e5538b343d87b3221b13b7bf3503bbfd70 (diff) | |
ShellMenuCollection, events not processed yet
Diffstat (limited to 'src/filetree.cpp')
| -rw-r--r-- | src/filetree.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/filetree.cpp b/src/filetree.cpp index 7128665d..543be82b 100644 --- a/src/filetree.cpp +++ b/src/filetree.cpp @@ -540,7 +540,19 @@ void FileTree::showShellMenu(QPoint pos) auto& menu = menus.begin()->second; menu.exec(m_tree, m_tree->viewport()->mapToGlobal(pos)); } else { + env::ShellMenuCollection mc; + for (auto&& m : menus) { + const auto* origin = m_core.directoryStructure()->findOriginByID(m.first); + if (!origin) { + log::error("origin {} not found for merged menus", m.first); + continue; + } + + mc.add(QString::fromStdWString(origin->getName()), std::move(m.second)); + } + + mc.exec(m_tree, m_tree->viewport()->mapToGlobal(pos)); } } |
