Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 304 Lines • ▼ Show 20 Line(s) | 304 | onClicked: { | |||
---|---|---|---|---|---|
305 | clearPressState(); | 305 | clearPressState(); | ||
306 | 306 | | |||
307 | if (mouse.button === Qt.RightButton || | 307 | if (mouse.button === Qt.RightButton || | ||
308 | childAt(mouse.x, mouse.y) == editor) { | 308 | childAt(mouse.x, mouse.y) == editor) { | ||
309 | return; | 309 | return; | ||
310 | } | 310 | } | ||
311 | 311 | | |||
312 | if (!hoveredItem || hoveredItem.blank || gridView.currentIndex == -1 || gridView.ctrlPressed || gridView.shiftPressed) { | 312 | if (!hoveredItem || hoveredItem.blank || gridView.currentIndex == -1 || gridView.ctrlPressed || gridView.shiftPressed) { | ||
313 | // Bug 357367: Replay mouse event, so containment actions assigned to left mouse button work. | ||||
314 | eventGenerator.sendMouseEvent(plasmoid, EventGenerator.MouseButtonPress, mouse.x, mouse.y, mouse.button, mouse.buttons, mouse.modifiers); | ||||
313 | return; | 315 | return; | ||
314 | } | 316 | } | ||
315 | 317 | | |||
316 | var pos = mapToItem(hoveredItem, mouse.x, mouse.y); | 318 | var pos = mapToItem(hoveredItem, mouse.x, mouse.y); | ||
317 | 319 | | |||
318 | // Moving from an item to its preview popup dialog doesn't unset hoveredItem | 320 | // Moving from an item to its preview popup dialog doesn't unset hoveredItem | ||
319 | // even though the cursor has left it, so we need to check whether the click | 321 | // even though the cursor has left it, so we need to check whether the click | ||
320 | // actually occured inside the item we expect it in before going ahead. If it | 322 | // actually occured inside the item we expect it in before going ahead. If it | ||
▲ Show 20 Lines • Show All 987 Lines • Show Last 20 Lines |