Merge branch 'master' into jgrpp
# Conflicts: # src/vehicle.cpp
This commit is contained in:
@@ -470,6 +470,8 @@ class NetworkContentListWindow : public Window, ContentCallback {
|
||||
/** Filter content by tags/name */
|
||||
static bool TagNameFilter(const ContentInfo * const *a, ContentListFilterData &filter)
|
||||
{
|
||||
if ((*a)->state == ContentInfo::SELECTED || (*a)->state == ContentInfo::AUTOSELECTED) return true;
|
||||
|
||||
filter.string_filter.ResetState();
|
||||
for (auto &tag : (*a)->tags) filter.string_filter.AddLine(tag);
|
||||
|
||||
@@ -812,6 +814,7 @@ public:
|
||||
if (click_count > 1 || IsInsideBS(pt.x, checkbox->pos_x, checkbox->current_x)) {
|
||||
_network_content_client.ToggleSelectedState(this->selected);
|
||||
this->content.ForceResort();
|
||||
this->content.ForceRebuild();
|
||||
}
|
||||
|
||||
if (this->filter_data.types.any()) {
|
||||
@@ -998,7 +1001,7 @@ public:
|
||||
this->SetWidgetDisabledState(WID_NCL_DOWNLOAD, this->filesize_sum == 0 || (FindWindowById(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD) != nullptr && data != 2));
|
||||
this->SetWidgetDisabledState(WID_NCL_UNSELECT, this->filesize_sum == 0);
|
||||
this->SetWidgetDisabledState(WID_NCL_SELECT_ALL, !show_select_all);
|
||||
this->SetWidgetDisabledState(WID_NCL_SELECT_UPDATE, !show_select_upgrade);
|
||||
this->SetWidgetDisabledState(WID_NCL_SELECT_UPDATE, !show_select_upgrade || !this->filter_data.string_filter.IsEmpty());
|
||||
this->SetWidgetDisabledState(WID_NCL_OPEN_URL, this->selected == nullptr || this->selected->url.empty());
|
||||
for (TextfileType tft = TFT_CONTENT_BEGIN; tft < TFT_CONTENT_END; tft++) {
|
||||
this->SetWidgetDisabledState(WID_NCL_TEXTFILE + tft, this->selected == nullptr || this->selected->state != ContentInfo::ALREADY_HERE || this->selected->GetTextfile(tft) == nullptr);
|
||||
|
Reference in New Issue
Block a user