mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +00:00
dolphinview: Fix right click broken on placeholderLabel
* This commit fixes the right click context menu not being shown whenever the click is made right on the placeholderLabel text Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
This commit is contained in:
parent
e4e68b90b1
commit
f0d201dcf1
|
@ -161,6 +161,10 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
|
|||
auto *centeringLayout = new QVBoxLayout(m_container);
|
||||
centeringLayout->addWidget(m_placeholderLabel);
|
||||
centeringLayout->setAlignment(m_placeholderLabel, Qt::AlignCenter);
|
||||
m_placeholderLabel->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_placeholderLabel, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos){
|
||||
slotViewContextMenuRequested(m_placeholderLabel->mapToGlobal(pos));
|
||||
});
|
||||
|
||||
controller->setSelectionBehavior(KItemListController::MultiSelection);
|
||||
connect(controller, &KItemListController::itemActivated, this, &DolphinView::slotItemActivated);
|
||||
|
|
Loading…
Reference in a new issue