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"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reapplies all sort and filter options by calling the appropriate update methods.
|
||||
*/
|
||||
void VisualDeckStorageWidget::reapplySortAndFilters()
|
||||
{
|
||||
updateSortOrder();
|
||||
updateTagFilter();
|
||||
updateColorFilter();
|
||||
updateSearchFilter();
|
||||
}
|
||||
|
||||
void VisualDeckStorageWidget::createRootFolderWidget()
|
||||
{
|
||||
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->widget()->setMaximumWidth(scrollArea->viewport()->width());
|
||||
scrollArea->widget()->adjustSize();
|
||||
updateSortOrder();
|
||||
reapplySortAndFilters();
|
||||
}
|
||||
|
||||
void VisualDeckStorageWidget::updateShowFolders(bool enabled)
|
||||
{
|
||||
if (folderWidget) {
|
||||
folderWidget->updateShowFolders(enabled);
|
||||
updateSortOrder();
|
||||
reapplySortAndFilters();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ private:
|
|||
QCheckBox *tagsOnWidgetsVisibilityCheckBox;
|
||||
QScrollArea *scrollArea;
|
||||
VisualDeckStorageFolderDisplayWidget *folderWidget;
|
||||
|
||||
void reapplySortAndFilters();
|
||||
};
|
||||
|
||||
#endif // VISUAL_DECK_STORAGE_WIDGET_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue