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:
@@ -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];
|
||||
|
Reference in New Issue
Block a user