Merge pull request #1231 from RumovZ/fix-filtered-deck

Fix filtered deck from browser
This commit is contained in:
Damien Elmes 2021-06-14 10:33:45 +10:00 committed by GitHub
commit a4dc8a0b82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -387,11 +387,11 @@ def legacy_func(sub: Optional[str] = None) -> Callable:
else:
hint = ""
def decorater(func: Callable) -> Callable:
def decorator(func: Callable) -> Callable:
def decorated_func(*args: Any, **kwargs: Any) -> Any:
print(f"'{func.__name__}' is deprecated{hint}.")
return func(*args, **kwargs)
return decorated_func
return decorater
return decorator

View file

@ -111,7 +111,6 @@ class FilteredDeckConfigDialog(QDialog):
self.form.name.setText(deck.name)
self.form.name.setPlaceholderText(deck.name)
self.set_custom_searches(self._desired_search_1, self._desired_search_2)
existing = deck.id != 0
if existing:
@ -152,6 +151,8 @@ class FilteredDeckConfigDialog(QDialog):
form.secondFilter.setChecked(show_second)
form.filter2group.setVisible(show_second)
self.set_custom_searches(self._desired_search_1, self._desired_search_2)
self.setWindowTitle(
without_unicode_isolation(tr.actions_options_for(val=self.deck.name))
)