2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

multi select started in media overview

This commit is contained in:
John Preston
2014-08-20 09:32:50 +04:00
parent c6423c0b65
commit dfb4d01015
10 changed files with 1144 additions and 198 deletions

View File

@@ -719,17 +719,10 @@ bool MediaView::event(QEvent *e) {
if (e->type() == QEvent::TouchBegin || e->type() == QEvent::TouchUpdate || e->type() == QEvent::TouchEnd || e->type() == QEvent::TouchCancel) {
QTouchEvent *ev = static_cast<QTouchEvent*>(e);
if (ev->device()->type() == QTouchDevice::TouchScreen) {
if (!ev->touchPoints().isEmpty()) {
QPoint p(mapFromGlobal(ev->touchPoints().cbegin()->screenPos().toPoint()));
if ((!_close.isHidden() && _close.geometry().contains(p)) ||
(!_save.isHidden() && _save.geometry().contains(p)) ||
(!_forward.isHidden() && _forward.geometry().contains(p)) ||
(!_delete.isHidden() && _delete.geometry().contains(p))) {
return QWidget::event(e);
}
if (ev->type() != QEvent::TouchBegin || ev->touchPoints().isEmpty() || !childAt(mapFromGlobal(ev->touchPoints().cbegin()->screenPos().toPoint()))) {
touchEvent(ev);
return true;
}
touchEvent(ev);
return true;
}
}
return QWidget::event(e);