mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
reapply sort and filters after each reset
This commit is contained in:
parent
e8574641b0
commit
01ff3f8acb
2 changed files with 16 additions and 3 deletions
|
|
@ -155,6 +155,17 @@ void VisualDeckStorageWidget::retranslateUi()
|
||||||
bannerCardComboBoxVisibilityCheckBox->setText(tr("Show Banner Card Selection Option"));
|
bannerCardComboBoxVisibilityCheckBox->setText(tr("Show Banner Card Selection Option"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reapplies all sort and filter options by calling the appropriate update methods.
|
||||||
|
*/
|
||||||
|
void VisualDeckStorageWidget::reapplySortAndFilters()
|
||||||
|
{
|
||||||
|
updateSortOrder();
|
||||||
|
updateTagFilter();
|
||||||
|
updateColorFilter();
|
||||||
|
updateSearchFilter();
|
||||||
|
}
|
||||||
|
|
||||||
void VisualDeckStorageWidget::createRootFolderWidget()
|
void VisualDeckStorageWidget::createRootFolderWidget()
|
||||||
{
|
{
|
||||||
folderWidget = new VisualDeckStorageFolderDisplayWidget(this, this, SettingsCache::instance().getDeckPath(), false,
|
folderWidget = new VisualDeckStorageFolderDisplayWidget(this, this, SettingsCache::instance().getDeckPath(), false,
|
||||||
|
|
@ -163,14 +174,14 @@ void VisualDeckStorageWidget::createRootFolderWidget()
|
||||||
scrollArea->setWidget(folderWidget); // this automatically destroys the old folderWidget
|
scrollArea->setWidget(folderWidget); // this automatically destroys the old folderWidget
|
||||||
scrollArea->widget()->setMaximumWidth(scrollArea->viewport()->width());
|
scrollArea->widget()->setMaximumWidth(scrollArea->viewport()->width());
|
||||||
scrollArea->widget()->adjustSize();
|
scrollArea->widget()->adjustSize();
|
||||||
updateSortOrder();
|
reapplySortAndFilters();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDeckStorageWidget::updateShowFolders(bool enabled)
|
void VisualDeckStorageWidget::updateShowFolders(bool enabled)
|
||||||
{
|
{
|
||||||
if (folderWidget) {
|
if (folderWidget) {
|
||||||
folderWidget->updateShowFolders(enabled);
|
folderWidget->updateShowFolders(enabled);
|
||||||
updateSortOrder();
|
reapplySortAndFilters();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -218,4 +229,4 @@ void VisualDeckStorageWidget::updateTagsVisibility(const bool visible)
|
||||||
} else {
|
} else {
|
||||||
tagFilterWidget->setHidden(true);
|
tagFilterWidget->setHidden(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -68,6 +68,8 @@ private:
|
||||||
QCheckBox *tagsOnWidgetsVisibilityCheckBox;
|
QCheckBox *tagsOnWidgetsVisibilityCheckBox;
|
||||||
QScrollArea *scrollArea;
|
QScrollArea *scrollArea;
|
||||||
VisualDeckStorageFolderDisplayWidget *folderWidget;
|
VisualDeckStorageFolderDisplayWidget *folderWidget;
|
||||||
|
|
||||||
|
void reapplySortAndFilters();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // VISUAL_DECK_STORAGE_WIDGET_H
|
#endif // VISUAL_DECK_STORAGE_WIDGET_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue