mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Refactored the onConfirmClicked function. Added the ability to auto-dismiss the incompatible packages. Changed the button text depending on the displayed list
This commit is contained in:
parent
05e17843c6
commit
38c7d80f82
2 changed files with 10 additions and 5 deletions
|
@ -29,9 +29,12 @@ class DiscrepanciesPresenter(QObject):
|
|||
self._dialog.accepted.connect(lambda: self._onConfirmClicked(model))
|
||||
|
||||
def _onConfirmClicked(self, model: SubscribedPackagesModel) -> None:
|
||||
# For now, all compatible packages presented to the user should be installed.
|
||||
# Later, we might remove items for which the user unselected the package
|
||||
# If there are incompatible packages - automatically dismiss them
|
||||
if model.getIncompatiblePackages():
|
||||
self._package_manager.dismissAllIncompatiblePackages(model.getIncompatiblePackages())
|
||||
model.setItems(model.getCompatiblePackages())
|
||||
self.packageMutations.emit(model) # #### proveri sho e ova???
|
||||
|
||||
# For now, all compatible packages presented to the user should be installed.
|
||||
# Later, we might remove items for which the user unselected the package
|
||||
if model.getCompatiblePackages():
|
||||
model.setItems(model.getCompatiblePackages())
|
||||
self.packageMutations.emit(model) # #### proveri sho e ova???
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue