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

Fix / improve support for album items selection.

This commit is contained in:
John Preston
2018-01-27 16:59:24 +03:00
parent 722264f634
commit 2fdc3169ce
34 changed files with 983 additions and 598 deletions

View File

@@ -607,14 +607,14 @@ void Inner::updateSelected() {
int row = -1, col = -1, sel = -1;
ClickHandlerPtr lnk;
ClickHandlerHost *lnkhost = nullptr;
HistoryCursorState cursor = HistoryDefaultCursorState;
HistoryView::CursorState cursor = HistoryView::CursorState::None;
if (sy >= 0) {
row = 0;
for (int rows = _rows.size(); row < rows; ++row) {
if (sy < _rows.at(row).height) {
if (sy < _rows[row].height) {
break;
}
sy -= _rows.at(row).height;
sy -= _rows[row].height;
}
}
if (sx >= 0 && row >= 0 && row < _rows.size()) {
@@ -632,7 +632,9 @@ void Inner::updateSelected() {
}
if (col < inlineItems.size()) {
sel = row * MatrixRowShift + col;
auto result = inlineItems[col]->getState(QPoint(sx, sy), HistoryStateRequest());
auto result = inlineItems[col]->getState(
QPoint(sx, sy),
HistoryView::StateRequest());
lnk = result.link;
cursor = result.cursor;
lnkhost = inlineItems[col];