mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Only emit compatible packages from DiscrepanciesPresenter
CURA-6983
This commit is contained in:
parent
1a1e8a9525
commit
b1ecfb627d
2 changed files with 5 additions and 1 deletions
|
@ -28,6 +28,7 @@ class DiscrepanciesPresenter(QObject):
|
|||
self._dialog.accepted.connect(lambda: self._onConfirmClicked(model))
|
||||
|
||||
def _onConfirmClicked(self, model: SubscribedPackagesModel):
|
||||
# For now, all packages presented to the user should be installed.
|
||||
# For now, all compatible packages presented to the user should be installed.
|
||||
# Later, we might remove items for which the user unselected the package
|
||||
model.setItems(model.getCompatiblePackages())
|
||||
self.packageMutations.emit(model)
|
||||
|
|
|
@ -41,6 +41,9 @@ class SubscribedPackagesModel(ListModel):
|
|||
if self._discrepancies != discrepancy:
|
||||
self._discrepancies = discrepancy
|
||||
|
||||
def getCompatiblePackages(self):
|
||||
return [x for x in self._items if x["is_compatible"]]
|
||||
|
||||
def update(self):
|
||||
self._items.clear()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue