mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Use API endpoint for requesting package_ids
Use new api endpoint for requesting specific package_ids so we don't have to filter ourselves. CURA-6990
This commit is contained in:
parent
b015617e13
commit
9c02f6500d
3 changed files with 6 additions and 12 deletions
|
@ -17,16 +17,10 @@ if TYPE_CHECKING:
|
|||
catalog = i18nCatalog("cura")
|
||||
|
||||
class MissingPackageList(RemotePackageList):
|
||||
def __init__(self, parent: Optional["QObject"] = None) -> None:
|
||||
def __init__(self, packages: List[Dict[str, str]], parent: Optional["QObject"] = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._package_metadata: List[Dict[str, str]] = []
|
||||
# self.packageTypeFilter = None # This will be our new filter
|
||||
self._package_type_filter = "material"
|
||||
|
||||
def setPackageIds(self, packages: List[Dict[str, str]]) -> None:
|
||||
self._package_metadata = packages
|
||||
search_string = ", ".join(map(lambda package: package["id"], packages))
|
||||
# self.setSearchString(search_string)
|
||||
self.setSearchString("ABS")
|
||||
|
||||
|
||||
self._search_type = "package_ids"
|
||||
self._requested_search_string = ",".join(map(lambda package: package["id"], packages))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue