2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

fixed activate-by-mouse Windows behaviour, 0.7.8

This commit is contained in:
John Preston
2015-01-16 19:34:23 +03:00
parent eb2bc17578
commit 13887d91d9
10 changed files with 19 additions and 17 deletions

View File

@@ -381,7 +381,7 @@ void HistoryList::dragActionStart(const QPoint &screenPos, Qt::MouseButton butto
if (_selected.cbegin().value() == FullItemSel) {
if (_selected.constFind(_dragItem) != _selected.cend() && App::hoveredItem()) {
_dragAction = PrepareDrag; // start items drag
} else {
} else if (!_dragWasInactive) {
_dragAction = PrepareSelect; // start items select
}
}
@@ -428,7 +428,7 @@ void HistoryList::dragActionStart(const QPoint &screenPos, Qt::MouseButton butto
}
if (uponSelected) {
_dragAction = PrepareDrag; // start text drag
} else {
} else if (!_dragWasInactive) {
if (afterDragSymbol) ++_dragSymbol;
uint32 selStatus = (_dragSymbol << 16) | _dragSymbol;
if (selStatus != FullItemSel && (_selected.isEmpty() || _selected.cbegin().value() != FullItemSel)) {
@@ -443,7 +443,7 @@ void HistoryList::dragActionStart(const QPoint &screenPos, Qt::MouseButton butto
_dragAction = PrepareSelect;
}
}
} else {
} else if (!_dragWasInactive) {
_dragAction = PrepareSelect; // start items select
}
}
@@ -594,6 +594,8 @@ void HistoryList::mouseDoubleClickEvent(QMouseEvent *e) {
_trippleClickPoint = e->globalPos();
_trippleClickTimer.start(QApplication::doubleClickInterval());
}
} else {
mousePressEvent(e);
}
}