1
0
Fork 0

Change: Don't select content when toggling its download status.

This improves usability when toggling content sorted by status, as the list position no longer jumps to the now (de)selected item, making it easier to (de)select multiple items.
pull/14059/head
Peter Nelson 2025-04-21 10:01:51 +01:00
parent 9ff2b4991f
commit 98d47cb5c2
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 4 additions and 4 deletions

View File

@ -785,14 +785,14 @@ public:
auto it = this->vscroll->GetScrolledItemFromWidget(this->content, pt.y, this, WID_NCL_MATRIX);
if (it == this->content.end()) return; // click out of bounds
this->selected = *it;
this->list_pos = it - this->content.begin();
const NWidgetBase *checkbox = this->GetWidget<NWidgetBase>(WID_NCL_CHECKBOX);
if (click_count > 1 || IsInsideBS(pt.x, checkbox->pos_x, checkbox->current_x)) {
_network_content_client.ToggleSelectedState(*this->selected);
_network_content_client.ToggleSelectedState(**it);
this->content.ForceResort();
this->content.ForceRebuild();
} else {
this->selected = *it;
this->list_pos = it - this->content.begin();
}
if (this->filter_data.types.any()) {