diff --git a/Modules/Panels/Tray/TrayDrawerPanel.qml b/Modules/Panels/Tray/TrayDrawerPanel.qml index b7898a97..2573f439 100644 --- a/Modules/Panels/Tray/TrayDrawerPanel.qml +++ b/Modules/Panels/Tray/TrayDrawerPanel.qml @@ -184,9 +184,15 @@ SmartPanel { if (!modelData.onlyMenu) { modelData.activate(); } + if ((PanelService.openedPanel !== null) && !PanelService.openedPanel.isClosing) { + PanelService.openedPanel.close(); + } } else if (mouse.button === Qt.MiddleButton) { // Middle click: activate with middle button modelData.secondaryActivate && modelData.secondaryActivate(); + if ((PanelService.openedPanel !== null) && !PanelService.openedPanel.isClosing) { + PanelService.openedPanel.close(); + } } else if (mouse.button === Qt.RightButton) { // Right click: open context menu TooltipService.hideImmediately();