2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Enable distinct selecting of grouped media.

This commit is contained in:
John Preston
2017-12-15 19:25:47 +03:00
parent 4c9931ab02
commit 537400d8b2
22 changed files with 880 additions and 306 deletions

View File

@@ -594,7 +594,7 @@ bool HistoryService::hasPoint(QPoint point) const {
}
HistoryTextState HistoryService::getState(QPoint point, HistoryStateRequest request) const {
HistoryTextState result;
auto result = HistoryTextState(this);
auto g = countGeometry();
if (g.width() < 1) {
@@ -618,7 +618,10 @@ HistoryTextState HistoryService::getState(QPoint point, HistoryStateRequest requ
if (trect.contains(point)) {
auto textRequest = request.forText();
textRequest.align = style::al_center;
result = _text.getState(point - trect.topLeft(), trect.width(), textRequest);
result = HistoryTextState(this, _text.getState(
point - trect.topLeft(),
trect.width(),
textRequest));
if (auto gamescore = Get<HistoryServiceGameScore>()) {
if (!result.link && result.cursor == HistoryInTextCursorState && g.contains(point)) {
result.link = gamescore->lnk;