fix triggering for contextMenuIsShown

--it should not be triggered in every view press
event but only when there is or not a context
menu any more
pull/15/head
Michail Vourlakos 5 years ago
parent a0e4f688e5
commit 0bb838d90e

@ -153,8 +153,6 @@ bool ContextMenu::mousePressEvent(QMouseEvent *event)
//qDebug() << "Step 0.5 ...";
m_contextMenu->close();
m_contextMenu = 0;
emit menuChanged();
// PlasmaQuick::ContainmentView::mousePressEvent(event);
return false;
}
@ -261,6 +259,7 @@ bool ContextMenu::mousePressEvent(QMouseEvent *event)
desktopMenu->setAttribute(Qt::WA_DeleteOnClose);
m_contextMenu = desktopMenu;
emit menuChanged();
//! deprecated old code that can be removed if the following plasma approach doesn't
//! create any issues with context menu creation in Latte
@ -336,7 +335,6 @@ bool ContextMenu::mousePressEvent(QMouseEvent *event)
desktopMenu->popup(globalPos);
event->setAccepted(true);
emit menuChanged();
return false;
}
@ -347,7 +345,6 @@ bool ContextMenu::mousePressEvent(QMouseEvent *event)
}
//qDebug() << "10 ...";
emit menuChanged();
return true;
// PlasmaQuick::ContainmentView::mousePressEvent(event);
}

@ -1471,7 +1471,6 @@ bool View::isHighestPriorityView() {
void View::mousePressEvent(QMouseEvent *event)
{
bool result = m_contextMenu->mousePressEvent(event);
emit contextMenuIsShownChanged();
if (result) {
PlasmaQuick::ContainmentView::mousePressEvent(event);

@ -1236,7 +1236,6 @@ Item {
Connections{
target: latteView && latteView.visibility ? latteView.visibility : root
ignoreUnknownSignals : true
onContainsMouseChanged: {
if (!latteView.visibility.containsMouse && !checkRestoreZoom.running) {
startCheckRestoreZoomTimer();

Loading…
Cancel
Save